Skip to main content
Almtuna
Inspiring
February 5, 2020
Answered

Courier New <space> is wider than the letters in HTML5/HTML Help output

  • February 5, 2020
  • 2 replies
  • 1365 views

In FM19 I have a paragraph style that uses the Courier New font. This gives fixed width characters - at least in FM and the pdf output.

But in the Responsive HTML5 or Windows HTML Help output, the letters are still fixed width, but the <space> character is suddenly a little bit wider. This makes the output look a bit messy, and is also harder to read.

How can I make the <space> character have the same width as the characters (letters and digits)?

This topic has been closed for replies.
Correct answer Almtuna

Solved!

Go to "Publish Settings", "Style Mapping", edit the Paragraph Style, set the Block attribute Word-spacing to "normal".

 

2 replies

Almtuna
AlmtunaAuthorCorrect answer
Inspiring
February 6, 2020

Solved!

Go to "Publish Settings", "Style Mapping", edit the Paragraph Style, set the Block attribute Word-spacing to "normal".

 

Bob_Niland
Community Expert
Community Expert
February 5, 2020

What is the actual raw HTML that's generated?
Which might be by way of asking if this is a user agent (browser-side) or user system (font) problem.

Alternatively, try:
U+00A0 no-break space: Ctrl+{space} in FM
U+2002 en space: Esc {space} n
U+2003 em space: Esc {space} m
U+205F medium mathematical space: might be Esc {space} 1

Almtuna
AlmtunaAuthor
Inspiring
February 5, 2020

You got it, the raw HTML contains "&#160;" characters, i.e. "no-break space".

It's used in short programming examples, to get several "space" before comments. Like:

 

int hv1, hv2;        -- comment with several apparently no-break space before...

 

Probably a work-around to avoid FM merging two <space> into one. (Which makes sense in regular text, but not in programming code examples.)

Can I simply turn off that space merging feature for my code paragrapgh style?

Bob_Niland
Community Expert
Community Expert
February 5, 2020

I've not used the HTML workflow in recent FM versions, so don't know what transform controls exist. You're probably dozen of clicks ahead of any poking around I might do.

As a temporary hack, the Wiki Whitespace character page lists a number of other Unicode values you could try.