4

Preface

I'm unsure whether this is the right place to ask this kind of thing but honestly, I'm at wit's end here, so I'll try anything. Feel free to migrate or edit.

Actual question

In a font I recently bought, a glyph is too small for my liking. I therefore decided altering the glyph slightly to show a longer extension from the baseline (I hope it's clear what I mean with this).

After doing some research, I have the following software at my disposal for changing the glyph:

  • FontForge
  • FontLab Studio 5

To check how the new font looks, I also have trial versions of

  • FontExplorer X Pro
  • Suitcase Fusion 6

(The final product is to be a math font for use with the TeX typesetting system.)

Editing any font is correctly reflected in both pieces of font editing software (Studio as well as FF).

However, something strange happens when I check the font in the font management software. FontExplorer does not show the edited glyph, while Suitcase Fusion does show the new glyph. Converting the OpenType file to readable font metrics for my typesetting software, the wrong glyph shows up in the glyph table.

I've tried changing some things around a bit. I can reproduce the problem on both of my Windows 7 systems (laptop/PC), I can reproduce the problem with either of two pieces of font editing software. Also, this happens for any glyph.

I've already tried changing the font cache, reinstalling everything (Windows included), or trying different fonts, glyphs, and so on. The problem persists.

For reproducability, consider Comic Sans (which I believe comes with any Windows distribution): a TrueType-flavoured OpenType font. I can change any glyph, say the capital letter A. To edit the glyph, I open up FontForge¹ and double click any glyph. I move an anchor point to a random location (you can change two anchor points to be sure). Afterwards, I save the font as a FontForge file (just to be sure) through File → Save as... In the new window I can save the font as say, comic2.sfd. I then export/generate the font through File → Generate Fonts..., where I'll select a fontname, say comic2.ttf, where I'll set options: TrueType, No Bitmap Fonts and No Rename. I only force glyph names to Validate Before Saving. I have not changed any settings in FontForge, so the Options window just shows defaults.

After validating, an error shows up saying that “the font contains errors”:

  • Wrong Direction
  • Missing Points at Extrema
  • Glyph contains overlapped hints (in the same hintmask)

I'm unsure what these mean, but I tell FontForge to go ahead anyway, so I clicked Save.

The newly generated font now doesn't show the correct glyph.


¹ tried several releases, but I tested most with the latest release as well as the July 14, 2012 release.

  • 1
    I can tell you where the errors come from: 1) Paths need to be in certain directions (the inside of the glyph must be on the right-hand side of the path). 2) It is preferrable if there is a vertex at every point on a path that is a local extremum in some cardinal direction (you can add such vertices with element → add extrema). 3) The overlapping hints probably result from the original hinting or from bad autohinting. You can avoid this message by selecting all glyphs and then Hints → Clear Hints (this is not a good thing in general, though). Neither of these explains your problem though. – Wrzlprmft Jun 13 '15 at 18:38
  • What happens if create some text with the altered font in some vector graphics application (e.g., Inkscape) and convert it to paths? This should give you a hint as to whether the problem is in the actual vector data of the font or in caching, hints and similar. – Wrzlprmft Jun 14 '15 at 8:42
4

I have resolved the issue, the culprit was the font's PostScript name (which I naively never changed). I'm guessing it has to do with the caching of fonts based on PostScript names or something. I don't understand it exactly.

To change the PostScript name, I've used FontLab Studio 5. In Studio 5, there's a "Font Info" icon to the top left of the "Font" window. Alternatively, press Ctrl+Alt+F to access font info:

enter image description here

The window that now appears has a "Names and Copyright" tab (It's the first tab that opens in my version of Studio). Change the PS font name to something that hasn't been declared before.

enter image description here

The font with the new glyph now shows up everywhere, including my typesetting program.

  • @Wrzlprmft Because I'm a new user I have to wait another twenty hours before I can accept the answer. Sob! – 1010011010 Jun 14 '15 at 21:06
3

A font file usually contains only vector information on the shapes of glyphs. Some fonts also come with so-called bitmap strikes for different font sizes though, which are usually hand-corrected for the best rendering. I guess that you have such a font and only changed the vector information while the bitmaps are unchanged. In some programs you now see the bitmap strikes and thus show the unchanged glyphs, while other programs render the vector data and show the changed glyphs.

If I am not mistaken, you can remove the bitmap strikes in FontForge by going to element → bitmap strikes available and remove all point sizes. Here is the respective manual entry.

Apart from this guess, I have no idea. I did something like you describe several times on Linux and encountered no problems.

  • Does FontForge actually calling hinting "bitmap strikes"? – DA01 Jun 13 '15 at 23:30
  • @DA01: No. Regular hinting, i.e., marking bar-like elements and similar, is called hinting. But saving small bitmaps for certain font sizes is called bitmap strikes. I never bothered about the latter, so I cannot tell you much more about it than I wrote in the answer. – Wrzlprmft Jun 14 '15 at 6:28
  • Thanks for your suggestion. There are no point sizes in Bitmap strikes available. – 1010011010 Jun 14 '15 at 8:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.