hakatashi / pixiv-novel-font

Japanese serif font with least modification for usages in vertical writings.
0 stars 0 forks source link

Problem on advance heights of some vertical glyphs. #2

Closed cc4966 closed 9 years ago

cc4966 commented 9 years ago

The vmtx table of this font has unexpected values for some glyphs in advance heights or top side bearings: for example, , , and have too big top side bearing or less advance height. I think that they should have AdnvanceHeight = 2048. In that case, the corresponding brackets, namely, , , and , also should have AdnvanceHeight = 2048.

hakatashi commented 9 years ago

Fmm... it seems that topSideBearing of some glyphs generated by fontforge is accidentally overspaced.

Some notable metrics information about (e.g.) aj674.pw.vert is:

Font advanceHeight topSideBearing
ipam.ttf 1044 328
ipamp.ttf 1044 328
pixiv-novel-font.ttf 1044 1331

Whilst my generatior script has nothing on this glyph, this may be a fontforge bug.

You say, @cc4966, that pixiv-novel-font must have advanceHeight = 2048 and topSideBearing = 328 for this glyph (against the original IPAMincho)? In that case, I can manually set them for erroring glyphs.

hakatashi commented 9 years ago

May this help...? http://www.akenotsuki.com/eyeben/fonts/kanren.html

cc4966 commented 9 years ago

This problem may be caused by cmap table. The glyph for U+FF08 is GID+12380 for proportinal, but GID+7380 for monospaced in IPA mincho. The cmap table of pixiv-novel-font maps U+FF08 to GID+12380 (I assume that this font is monospaced). Moreover, this cmap has no map of U+FF5E even though IPA mincho has a map.

cc4966 commented 9 years ago

The following procedure can be help for this problem.

  1. Decompile the original font by using ttx.
  2. Edit the original font by using FontForge.
  3. Decompile the work by using ttx.
  4. Merge the decompiled data by using a text editor.
  5. Compile the final data by using ttx.

ttx is a font tool in AFDKO.

hakatashi commented 9 years ago

This problem may be caused by cmap table.

Uh, I see. I didn't notice the mapping inconsistency. Though topSideBearing of aj674.pw.vert (GID+12595) still seems buggy, mapping U+FF08 to aj7899 (GID+7380) will resolve the problem. I'll issue the fix soon.

The following procedure can be help for this problem.

Yes TTX is a great tool for font inspection but a tough way to modify and pack fonts by scripting. Merging two fonts is one of the hardest operation on XML, and out of proportion (in contrast to that FontForge has one simple function MergeFonts()).

hakatashi commented 9 years ago

Fixed in c38d98f647348c490f2ce7c55c9e3de3cc5c260e