-
Notifications
You must be signed in to change notification settings - Fork 603
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
Multiple strikes in OpenType bitmap fonts can't use different advance widths #4430
Comments
We can implement that (and |
That'd be super cool. Thank you! |
I don't have time immediately work on this. If anyone else wants to pick it up that would be great. |
Happy new year! Just wanted to give this a bump - please let me know if there's anything else I can provide by way of debugging info to facilitate this. |
I'll take a look soon. |
One issue I can think of is that the |
Hi @behdad - just wanted to shake the tree on this a little. I'm not sure how to answer the question about the I know this probably isn't high on the priority list and I appreciate you taking a look. =) Thanks! |
I haven't forgotten this. Can you produce a font with hdmx? I'll then try to implement it. Thanks. |
Ah, so it may also be the cause of some bitmap fonts getting |
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
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:
![image](https://private-user-images.githubusercontent.com/66847847/273395771-e1652d25-6f24-46f5-8fec-e78ba25488b5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NjE5MjgsIm5iZiI6MTcxOTc2MTYyOCwicGF0aCI6Ii82Njg0Nzg0Ny8yNzMzOTU3NzEtZTE2NTJkMjUtNmYyNC00NmY1LThmZWMtZTc4YmEyNTQ4OGI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE1MzM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlZGE4YjQ5OTU1Mzg2MmZiYmU5NWNhZDdhMWFiNTY5OGY4ZmFmMTllMjJjN2IzNzYwNmEzMDgxNmZiZjEwM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RNd6C8d3V6CtgNilLiYzo3xEraRjoY8Bay0Qu2w1CDI)
But it should look like this:
![image](https://private-user-images.githubusercontent.com/66847847/273395804-47a32a03-9695-45f4-9a19-d498c36f2999.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NjE5MjgsIm5iZiI6MTcxOTc2MTYyOCwicGF0aCI6Ii82Njg0Nzg0Ny8yNzMzOTU4MDQtNDdhMzJhMDMtOTY5NS00NWY0LTlhMTktZDQ5OGMzNmYyOTk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE1MzM0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVkY2VjNmNhOWY0NmU1YTZiODg3NzQ1ZjE1MjczMjI3MTdkNzk4NzExMWQ0YTg0OGNiOTA2OWRjZDFjZDY4YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UxM1b1iPGeFY1q5wlLQXR3CNmhfph9PYXo19wOkoIj4)
Am happy to provide any more information that might be needed. Thanks for looking!
The text was updated successfully, but these errors were encountered: