Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3945 closed Feature Requests (invalid)

[boostbook] stylesheet font for code makes 1 and l indistinguishable

Reported by: dan.pidcock@… Owned by: Matias Capeletto
Milestone: Boost 1.43.0 Component: Documentation
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc:

Description

The font used for the boost book documentation has the same glyph appearance for 1 (one) and l (ell). This makes code samples such as the first example at http://www.boost.org/doc/libs/1_42_0/doc/html/lambda/using_library.html very hard to follow.

When I put the same code in <pre> or <code> a bare HTML file the characters are easy to distinguish. I have tried with chrome and firefox browsers and get the same problem.

Change History (4)

comment:1 by anonymous, 13 years ago

That's a bit odd as we don't set a font for code samples. Can you try these two versions to see if they're the same?

http://www.boost.org/doc/libs/1_40_0/doc/html/lambda/using_library.html http://boost-sandbox.sourceforge.net/doc/html/lambda/using_library.html

We changed the charset in the documentation recently, if the first link looks different then that's the cause. The second link is the trunk documentation served from a different server, if that's okay then it's something to do with the website style or server. Can you also try looking at a local copy?

If none of those are different, what operating system are you using? Screenshots could also be useful.

comment:2 by danio <dan.pidcock@…>, 13 years ago

I just looked into it a bit more and it's caused by the font size being set to 9 point in .programlisting in boostbook.css.

The problem with this is that many fixed fonts have no difference between 1 and l at that size (at least on windows). All of Courier, Courier New, Bitstream Vera Sans Mono have this issue. Using DejaVu Sans Mono or Lucida Console are OK.

Internet explorer iS OK because it performs anti-aliasing and so the characters can be distinguished.

A possible fix would be to set the font-family to something like DejaVu Sans Mono, Lucida Console. On other platforms where these fonts aren't available it should fall back to the default fixed font.

I can try viewing these pages on Linux later to see how they are affected.

comment:3 by René Rivera, 13 years ago

Resolution: invalid
Status: newclosed

We don't set the font to anything other than the standard preformatted style. If you are having problems with how it displays in your system, change the font your browser uses for fixed width display.

comment:4 by danio <dan.pidcock@…>, 13 years ago

The font size is changed by doc/src/boostbook.css:

.programlisting, .screen {

font-size: 9pt; display: block; margin: 1pc 4% 0pc 4%; padding: 0.5pc 0.5pc 0.5pc 0.5pc;

}

I am happy with changing my browser default font but was raising an issue in the hope it would be helpful to sort this out for all the other windows C++ developers who don't use internet explorer.

Note: See TracTickets for help on using tickets.