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

Add psautohint step #1

Open
Transfusion opened this issue Mar 24, 2021 · 3 comments
Open

Add psautohint step #1

Transfusion opened this issue Mar 24, 2021 · 3 comments

Comments

@Transfusion
Copy link
Member

Self explanatory, figure out how to modify the header of the CIDInfo file without messing up the binary data below, then call psautohint

...
/Private 7 dict dup begin
/BlueValues [0 0] def
/password 5839 def
...
@Transfusion
Copy link
Member Author

http://web.archive.org/web/20170401003624/https://blogs.adobe.com/CCJKType/2012/04/the-bluevalues-array.html

CJK Alignment Zones
For name-keyed fonts whose glyphs are primarily CJK, such as kana fonts, and for the FDArray elements of CID-keyed fonts > that correspond to CJK glyphs, such as kana, ideographs, and Korean hangul syllables, along with most symbols, specifying > alignment zones can be detrimental, mainly because these glyphs are usually centered in the em-box, optically or otherwise. > For such fonts, the following (fixed) /BlueValues array is recommended, because it places alignment zones outside of the > em-box so that they do not influence the glyphs:
/BlueValues [-250 -250 1100 1100] def
This /BlueValues array places a single-unit alignment zone at Y-axis coordinate -250, and another one at 1100.

@Transfusion
Copy link
Member Author

Unhinted, Mincho, paths offset:

$ ls -lah |grep -i otf
-rw-rw-r--.   1 transfusion transfusion  29M Mar 25 13:51 HanaMinModLiteA1KR.otf
-rw-rw-r--.   1 transfusion transfusion 4.5M Mar 25 13:52 HanaMinModLiteA2KR.otf
-rw-rw-r--.   1 transfusion transfusion  27M Mar 25 13:52 HanaMinModLiteBKR.otf
-rw-rw-r--.   1 transfusion transfusion  16M Mar 25 13:52 HanaMinModLiteCKR.otf
-rw-rw-r--.   1 transfusion transfusion  14K Mar 25 13:51 HanaMinModLiteTestKR.otf

Hinted, Mincho, paths offset:

$ 7z l hanaminmod-lite.zip |grep -i otf
2021-03-24 23:46:20 .....        16732         6960  HanaMinModLiteTestKR.otf
2021-03-24 23:55:06 .....     36362044     15303196  HanaMinModLiteA1KR.otf
2021-03-24 23:56:16 .....      5155960       757998  HanaMinModLiteA2KR.otf
2021-03-25 00:04:56 .....     34226800     16355142  HanaMinModLiteBKR.otf
2021-03-25 00:09:58 .....     20667568     10498837  HanaMinModLiteCKR.otf

29 MB -> 36.3M, 4.5M -> 5.15M, 27M -> 34.2M, 16M -> 20.66M

If we are very close to the 65,535 glyph limit of CID-keyed fonts (A1 and B are) with very badly optimized glyphs, an extra 7 MB (!) can be expected.

@Transfusion
Copy link
Member Author

Transfusion commented Mar 25, 2021

Unhinted
image

Hinted
image

1080p 21.5" monitor, 102

StdHW number(Optional). This number specifies the dominant width of horizontal stems (measured vertically in character space units)
StdVW number(Optional). This number specifies the dominant with of vertical stems (measured horizontally in character space units).

Visual inspection of the font in FontForge suggests that the values being used are suitable https://github.com/kawabata/glyphwiki-afdko/blob/master/hintparam.txt, which is strange

https://adobe-type-tools.github.io/font-tech-notes/pdfs/5004.AFM_Spec.pdf

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

1 participant