Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

80 characters won't fit sometimes one line in the html output #2611

Open
eksperimental opened this issue Dec 28, 2016 · 2 comments
Open

80 characters won't fit sometimes one line in the html output #2611

eksperimental opened this issue Dec 28, 2016 · 2 comments

Comments

@eksperimental
Copy link
Contributor

eksperimental commented Dec 28, 2016

instead of using 1em, if you use 0.99em as the font-size, that change will make the lines fit in.
for example, in the Erlang page.

% followed by a pattern (in parentheses), and the body consists of a sequence of

will have the last word "of" in a new line.

@divayprakash
Copy link
Collaborator

This needs to be tested to determine the current situation.

@nbehrnd
Copy link
Contributor

nbehrnd commented Nov 16, 2022

@eksperimental @divayprakash This likely depends on the web browser's setup. Though my observations below relate to Firefox in an instance of Linux Debian 12/bookworm, I speculate there equally is an option to adjust other web browsers, too.

The underlying potential pitfall is the selected font and its width of characters which may vary (proportional fonts), or not (non-proportional fonts). After all, a selection of e.g., Courier 12 pt over Courier 14 pt only relates to corpus size/x-height of the glyphs, however does not account for potentially different width (e.g., Courier 12 pt vs DejaVu Sans Mono 12). Both (and other) parameters contribute to the ease of reading.

According to Change the fonts and colors websites use, it is possible to pick different fonts for regular text, and about snippets of code in monospace. In Firefox' GUI, select Settings -> General -> Language and Appearance -> Fonts -> Advanced for this widget:

setup

An adjustment of the parameters affects the display right after closing the above widget. To illustrate the result for a section about Fortran (at present, the code block stays within the 80 character/line limit), below an example with Bitstream Vera Sans Mono, 12 pt (provided by the OS here):

example_01

or with Inconsolata, 12 pt (source):

example_02

While this could close this thread of 5+ years, maybe it is worth an additional line in the documentation of the project or/and the landing page (https://learnxinyminutes.com/). What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants