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

Missing FT_LOAD_NO_HINTING causes crashes #143

Closed
heftig opened this issue Oct 15, 2015 · 2 comments
Closed

Missing FT_LOAD_NO_HINTING causes crashes #143

heftig opened this issue Oct 15, 2015 · 2 comments

Comments

@heftig
Copy link
Contributor

heftig commented Oct 15, 2015

Users are seeing crashes in FreeType 2.6.1 since HarfBuzz 1.0.5:
https://bbs.archlinux.org/viewtopic.php?pid=1570725

Backtrace of such a crash (Firefox on http://chess24.com):
http://pkgbuild.com/~heftig/backtrace.tar.xz

Adding FT_LOAD_NO_HINTING to the default load_flags solves the problem:

diff --git i/src/hb-ft.cc w/src/hb-ft.cc
index b695f81..2b11882 100644
--- i/src/hb-ft.cc
+++ w/src/hb-ft.cc
@@ -84,7 +84,7 @@ _hb_ft_font_create (FT_Face ft_face, bool unref)
   ft_font->ft_face = ft_face;
   ft_font->unref = unref;

-  ft_font->load_flags = FT_LOAD_DEFAULT;
+  ft_font->load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;

   return ft_font;
 }
@behdad
Copy link
Member

behdad commented Oct 15, 2015

Ok ok, I'm reverting that change and making a release...

@behdad
Copy link
Member

behdad commented Oct 15, 2015

Released 1.0.6.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 21, 2015
Overview of changes leading to 1.0.6
Thursday, October 15, 2015
====================================

- Reduce max nesting level in OT lookups from 8 to 6.
  Should not affect any real font as far as I know.
- Fix memory access issue in ot-font.
- Revert default load-flags of fonts created using hb_ft_font_create()
  back to FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING.  This was changed in
  last release (1.0.5), but caused major issues, so revert.
  harfbuzz/harfbuzz#143


Overview of changes leading to 1.0.5
Tuesday, October 13, 2015
====================================

- Fix multiple memory access bugs discovered using libFuzzer.
  harfbuzz/harfbuzz#139
  Everyone should upgrade to this version as soon as possible.
  We now have continuous fuzzing set up, to avoid issues like
  these creeping in again.
- Misc fixes.

- New API:
  * hb_font_set_parent().
  * hb_ft_font_[sg]et_load_flags()
    The default flags for fonts created using hb_ft_font_create()
    has changed to default to FT_LOAD_DEFAULT now.  Previously it
    was defaulting to FT_LOAD_DFEAULT|FT_LOAD_NO_HINTING.

- API changes:
  * Fonts now default to units-per-EM as their scale, instead of 0.
  * hb_font_create_sub_font() does NOT make parent font immutable
    anymore.  hb_font_make_immutable() does.
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Nov 6, 2015
Overview of changes leading to 1.0.6
Thursday, October 15, 2015
====================================

- Reduce max nesting level in OT lookups from 8 to 6.
  Should not affect any real font as far as I know.
- Fix memory access issue in ot-font.
- Revert default load-flags of fonts created using hb_ft_font_create()
  back to FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING.  This was changed in
  last release (1.0.5), but caused major issues, so revert.
  harfbuzz/harfbuzz#143


Overview of changes leading to 1.0.5
Tuesday, October 13, 2015
====================================

- Fix multiple memory access bugs discovered using libFuzzer.
  harfbuzz/harfbuzz#139
  Everyone should upgrade to this version as soon as possible.
  We now have continuous fuzzing set up, to avoid issues like
  these creeping in again.
- Misc fixes.

- New API:
  * hb_font_set_parent().
  * hb_ft_font_[sg]et_load_flags()
    The default flags for fonts created using hb_ft_font_create()
    has changed to default to FT_LOAD_DEFAULT now.  Previously it
    was defaulting to FT_LOAD_DFEAULT|FT_LOAD_NO_HINTING.

- API changes:
  * Fonts now default to units-per-EM as their scale, instead of 0.
  * hb_font_create_sub_font() does NOT make parent font immutable
    anymore.  hb_font_make_immutable() does.
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