be5invis / Iosevka

Versatile typeface for code, from code.
http://be5invis.github.io/Iosevka
SIL Open Font License 1.1
18.94k stars 569 forks source link

Braces regular and bold misalignment #1422

Closed xsrvmy closed 1 year ago

xsrvmy commented 1 year ago

The hinting of the braces causes the normal and bold variant to be misaligned. This is at point size 12 without hidpi. Presumably this has something to do with hinting.

image


be5invis commented 1 year ago

ttfautohint's "reference font" feature (that unifies blue zones) always fails on my system :(. So I have to process each subfamily separately (which produces non-unified blues).

Maybe a bug in TTFA?

cc. @lemzwerg

xsrvmy commented 1 year ago

Hmm... might try calling ttfa myself then since I am compiling a customized version.

lemzwerg commented 1 year ago

@be5invis, this is easily possible :-) Please be more specific what problems you encounter, ideally with a test case that I can check.

be5invis commented 1 year ago

@lemzwerg

This command (on win32)

ttfautohint -R .\dist\iosevka\ttf\iosevka-regular.ttf .\dist\iosevka\ttf-unhinted\iosevka-bold.ttf .\dist\iosevka\ttf\iosevka-bold.ttf

... gives me this error message:

An error with code 0x02 occurred while loading the reference font
 unknown file format  

Not sure whether it is platform-specific.

Using ttfautohint 1.8.4.

nyanpasu64 commented 1 year ago

Ran into the same bug (ttfautohint -R/--reference fails on Windows) and finally found the cause:

https://repo.or.cz/ttfautohint.git/blob/HEAD:/frontend/main.cpp#l1387

reference = fopen(reference_name, "r");

The reference font is a binary file and should be opened with "rb", otherwise it will be corrupted on Windows. Making this change fixes my local build of ttfautohint-1.8.4 on MSYS2 UCRT64.

I don't know if control = fopen(control_name, "r"); should also be opened with "rb" or not.

I haven't reported upstream to FreeType/Werner Lemberg yet. @lemzwerg you could fix this directly, or I or @be5invis could make a post to freetype-devel@nongnu.org.

lemzwerg commented 1 year ago

Thanks a lot! I've pushed your fix to the ttfautohint repository.

be5invis commented 1 year ago

@lemzwerg Do you have plan for next release?

lemzwerg commented 1 year ago

No plans yet, sorry.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.