Multiple strikes in OpenType bitmap fonts can't use different advance widths
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 779
- Avg merge
- 14h 26m
- Merged PRs (30d)
- 76
Description
Hi HarfBuzz devs!
tl;dr: EBDT/EBLC tables contain advance widths per strike in pixels, but HarfBuzz ignores them and only uses advance widths from the hmtx table
What I'm trying to do is create an OpenType (.otb) version of a bitmap font that contains multiple strikes. The problem I have is that even in bitmap-only OpenType fonts, HarfBuzz appears to take advance widths from the hmtx table and ignore the ones provided in the EBDT/EBLC tables. This wouldn't be a problem in a bitmap font with only one strike, since the values from EBDT/EBLC could just be mirrored in hmtx (after being converted from pixels to font units), however, in fonts with multiple strikes, if the advance widths aren't proportional to the pixels per em, the font writer appears to be out of luck...
I'm attaching a font with such a problem: [monegasque.otb.gz](https://github.com/harfbuzz/harfbuzz/files/12838159/monegasque.otb.gz)
It contains strikes at both 12 ppem and 16 ppem (9 and 12 point), however only the advance widths of the 12 ppem strike are correct - the advance widths of the 16 ppem strike are too wide.
The 16 ppem strike looks like this:

But it should look like this:

Am happy to provide any more information that might be needed. Thanks for looking!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.