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

Error in FAQ: Ensuring monospace #5362

Open
abananabag opened this issue Feb 2, 2024 · 3 comments
Open

Error in FAQ: Ensuring monospace #5362

abananabag opened this issue Feb 2, 2024 · 3 comments

Comments

@abananabag
Copy link

The current answer to how to mark a font as monospaced in the FAQ at https://fontforge.org/docs/faq.html#faq-monospace is outdated and incorrect.

The current (incorrect) answer

How do I mark a font as monospaced?

You don’t. Just insure that all the glyphs in the font have the same width and then FontForge will automatically mark it as monospaced for you. (If you mark it as monospaced incorrectly some rasterizers will give strange results).

If you want to set a font’s panose values yourself (Element->Font Info->OS/2->Panose) then set the Proportion field to Monospaced. This is necessary but not sufficient to mark the font as a whole as monospaced.

If you are unsure whether all the glyphs in your font have the same advance width use Element->Find Problems->Random->Check Advance.

When I say “all glyphs” I really mean all glyphs. Even glyphs which unicode says should be 0 width must have the same width as everything else. MicroSoft suggests that GPOS be used to do accent combination (etc.) and then change the advance width on any marks (accents) to be 0.

Suggested fixes

  • Tell people how to ensure that all glyphs in the font have the same width
  • Move validation to its own question
  • Correct location of menu items for validation
  • Provide context for Panose and Zero-width Accents

Suggested new version

How do I mark a font as monospaced?

You don’t. Just insure that all the glyphs in the font have the same width and then FontForge will automatically mark it as monospaced for you. (If you mark it as monospaced incorrectly some rasterizers will give strange results). You can force all glyphs to the same width using the Set Width option. Steps:

  1. Make sure EncodingCompact has a checkmark
  2. Press CtrlA (Selects all visible glyphs)
  3. Press CtrlShiftL (Opens MetricsSet Width dialogue)
  4. Type in the width you want
  5. Click OK

How can I validate my monospaced font without changing it?

If you are unsure whether all the glyphs in your font have the same advance width use Element->Validation->Find Problems->BB->Check Advance.

How can accents be handled in a monospace font?

Even glyphs which unicode says should be 0 width must have the same width as everything else or FontForge will not mark the font as monospaced. MicroSoft suggests that GPOS be used to do accent combination (etc.) and then change the advance width on any marks (accents) to be 0.

What if I know better than FontForge?

If you want to set a font’s panose values yourself use (Element->Font Info->OS/2->Panose) then set the Proportion field to Monospaced. This is necessary but not sufficient to mark the font as a whole as monospaced.

@iorsh
Copy link
Contributor

iorsh commented Feb 2, 2024

The new structure looks good. Could you please also address duospaced fonts?

@martinbutt
Copy link

The new instructions work

@ChiefMikeK
Copy link

fyi: The chart @ https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms#In_Unicode
open type codes would be a good addition ⚓

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

No branches or pull requests

4 participants