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 support for expanded stretch in head table #3263

Closed
jesusdesantos opened this issue Oct 21, 2021 · 2 comments
Closed

Add support for expanded stretch in head table #3263

jesusdesantos opened this issue Oct 21, 2021 · 2 comments

Comments

@jesusdesantos
Copy link

We fully replaced FreeType with HarfBuzz and in parts of our code we are directly reading TTF tables. The 'head' table has all member protected and we can't access the macStyle flags. We added the following changes, not sure if you want to apply them.

`
Index: hb-ot-head-table.hh
===================================================================
--- hb-ot-head-table.hh	(revision 10825)
+++ hb-ot-head-table.hh	(working copy)
@@ -72,12 +72,14 @@
     UNDERLINE	= 1u<<2,
     OUTLINE	= 1u<<3,
     SHADOW	= 1u<<4,
-    CONDENSED	= 1u<<5
+    CONDENSED	= 1u<<5,
+    EXPANDED	= 1u<<6
   };
 
   bool is_bold () const      { return macStyle & BOLD; }
   bool is_italic () const    { return macStyle & ITALIC; }
   bool is_condensed () const { return macStyle & CONDENSED; }
+  bool is_expanded () const { return macStyle & EXPANDED; }
 
   bool sanitize (hb_sanitize_context_t *c) const
   {

`
@behdad
Copy link
Member

behdad commented Oct 21, 2021

Thanks. Does the public API (hb-style in this case) suffice for your app, or what is missing?

@jesusdesantos
Copy link
Author

jesusdesantos commented Oct 21, 2021

Not really, we need the low-level bits. We are a WPF implementation for videogames and need to strictly follow what Microsoft does regarding name tables and font styles.

Thanks!

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

2 participants