src/hb-ft.h


Log

Author Commit Date CI Message
Behdad Esfahbod 4e478131 2017-10-12T10:33:16 [ft] Add hb_ft_font_changed() When the font size or variations settings on underlying FT_Face change, one can call hb_ft_font_changed() and continue using hb_font created using hb_ft_font_create(). Fixes https://github.com/behdad/harfbuzz/issues/559 New API: hb_ft_font_changed()
Chun-wei Fan 835bbdc7 2015-11-19T18:34:12 Public headers: Decorate public symbols with HB_EXTERN This prepares the headers for exporting symbols using visibility attributes or __declspec(dllexport), so that we do not need to maintain symbols listing files, as this is what was and is done in GLib and GTK+.
Behdad Esfahbod 2a9627c5 2015-10-07T17:33:20 [ft] API: Add hb_font_[sg]et_load_flags() API This changes the default load_flags of fonts created using hb_ft_font_create() from NO_HINTING to DEFAULT. Hope that doesn't break too much client code. Code calling hb_ft_font_set_funcs() is unaffected.
Behdad Esfahbod 350f3a02 2014-12-28T17:44:26 [ft] Add hb_ft_face_create_referenced() and hb_ft_font_create_referenced() When I originally wrote hb-ft, FreeType objects did not support reference counting. As such, hb_ft_face_create() and hb_ft_font_create() had a "destroy" callback and client was responsible for making sure FT_Face is kept around as long as the hb-font/face are alive. However, since this was not clearly documented, some clienets didn't correctly did that. In particular, some clients assumed that it's safe to destroy FT_Face and then hb_face_t. This, indeed, used to work, until 45fd9424c723f115ca98995b8f8a25185a6fc71d, which make face destroy access font tables. Now, I fixed that issue in 395b35903e052aecc97d0807e4f813c64c0d2b0b since the access was not needed, but the problem remains that not all clients handle this correctly. See: https://bugs.freedesktop.org/show_bug.cgi?id=86300 Fortunately, FT_Reference_Face() was added to FreeType in 2010, and so we can use it now. Originally I wanted to change hb_ft_face_create() and hb_ft_font_create() to reference the face if destroy==NULL was passed in. That would improve pretty much all clients, with little undesired effects. Except that FreeType itself, when compiled with HarfBuzz support, calls hb_ft_font_create() with destroy==NULL and saves the resulting hb-font on the ft-face (why does it not free it immediately?). Making hb-face reference ft-face causes a cycling reference there. At least, that's my current understanding. At any rate, a cleaner approach, even if it means all clients will need a change, is to introduce brand new API. Which this commit does. Some comments added to hb-ft.h, hoping to make future clients make better choices. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=75299
Behdad Esfahbod d1c9eb45 2012-04-12T13:17:44 Make it an error to include non-top-level headers Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but never things like hb-shape.h directly. This makes it easier to refactor headers later on without breaking compatibility.
Behdad Esfahbod 01ec13a1 2011-08-10T22:00:35 Implement hb_ft_font_get_face
Behdad Esfahbod 38b21187 2011-08-09T10:51:24 [API] Add hb_ft_font_set_funcs(), remove hb_ft_get_font_funcs() Remove hb_ft_get_font_funcs() as it cannot be used by the user anyway. Add hb_ft_font_set_funcs(). Which will make the font internally use FreeType. That is, no need for the font to have created using the hb-ft API. Just create using hb_face_create()/hb_font_create() and then call this on the font (after having set font scale). This internally creates an FT_Face and attached to the font.
Behdad Esfahbod 2409d5f8 2011-04-21T17:14:28 Update Copyright headers
Behdad Esfahbod 2d7b61a4 2011-04-20T16:40:56 [TODO] Remove done items
Behdad Esfahbod acdba3f9 2010-07-23T15:11:18 Prefer C linkage
Behdad Esfahbod f1aaa2a4 2010-04-23T15:19:50 Add TODO
Behdad Esfahbod c755cb3e 2010-04-22T00:11:43 Change header comment
Behdad Esfahbod 6358ff45 2009-11-05T17:39:16 Add hb_ft_face_create_cached
Behdad Esfahbod 8fb3d1aa 2009-11-03T18:34:20 Start ft glue