diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2018-09-11 15:03:13 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-09-12 14:15:15 +0200 |
commit | 2523e10b5856bebd534385f4beec0386e2c800fa (patch) | |
tree | 5296735a1c63fd1a93ff76de422c2490c1cc45df /vcl | |
parent | 21c89633f93f2b03bfd554be067bcf18429e5d8e (diff) |
Simplify HarfBuzz shaping call
We were using a shape plan explicitely to report which shaper HarfBuzz
ended up using, but the logging was dropped in:
commit 919d5ac6b02e85126b3938c31daf4a891d3b2d90
Author: Khaled Hosny <khaledhosny@eglug.org>
Date: Sat Mar 4 05:06:47 2017 +0200
Make vcl.harfbuzz logging less verbose
Change-Id: I9b93c11e34ca880e9a60fb0fce49777c274568e6
So simplify the call and use the simpler hb_shape_full (which does the
same thing this code was doing).
Change-Id: I9122280869fb84a212fcf28cd8f2d58259a6b6bf
Reviewed-on: https://gerrit.libreoffice.org/60327
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index e4312847d72b..b1bd43fdf801 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -277,7 +277,6 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const SalLayoutGlyphs* } hb_font_t *pHbFont = mpFont->GetHbFont(); - hb_face_t* pHbFace = hb_font_get_face(pHbFont); int nGlyphCapacity = 2 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos); m_GlyphItems.reserve(nGlyphCapacity); @@ -438,14 +437,9 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const SalLayoutGlyphs* // but there is no harm in always including it, HarfBuzz will // ignore unavailable shapers. const char*const pHbShapers[] = { "graphite2", "coretext_aat", "ot", "fallback", nullptr }; - hb_segment_properties_t aHbProps; - hb_buffer_get_segment_properties(pHbBuffer, &aHbProps); - hb_shape_plan_t* pHbPlan = hb_shape_plan_create_cached(pHbFace, &aHbProps, maFeatures.data(), maFeatures.size(), pHbShapers); - bool ok = hb_shape_plan_execute(pHbPlan, pHbFont, pHbBuffer, maFeatures.data(), maFeatures.size()); + bool ok = hb_shape_full(pHbFont, pHbBuffer, maFeatures.data(), maFeatures.size(), pHbShapers); assert(ok); (void) ok; - hb_buffer_set_content_type(pHbBuffer, HB_BUFFER_CONTENT_TYPE_GLYPHS); - hb_shape_plan_destroy(pHbPlan); int nRunGlyphCount = hb_buffer_get_length(pHbBuffer); hb_glyph_info_t *pHbGlyphInfos = hb_buffer_get_glyph_infos(pHbBuffer, nullptr); |