[Libreoffice-commits] core.git: Branch 'feature/commonsallayout' - vcl/source
Khaled Hosny
khaledhosny at eglug.org
Sun Oct 9 17:10:39 UTC 2016
vcl/source/gdi/CommonSalLayout.cxx | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 115121d5751d5ee489422e41a361a7da30a092b4
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Sun Oct 9 19:08:18 2016 +0200
Revert "Use HarfBuzz shape plan for a bit more control"
This reverts commit 8b32ead0b988b142cd9878f126d985d946fd4ccc.
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index d4f0dc2..7bcbf1d 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -314,7 +314,6 @@ void CommonSalLayout::DrawText( SalGraphics& rSalGraphics ) const
bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
{
- hb_face_t* pHbFace = hb_font_get_face(mpHbFont);
hb_script_t aHbScript = HB_SCRIPT_INVALID;
int nGlyphCapacity = 2 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos);
@@ -416,13 +415,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
#if HB_VERSION_ATLEAST(0, 9, 42)
hb_buffer_set_cluster_level(pHbBuffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
#endif
- const char *pHbShapers[5] = { "coretext_aat", "graphite2", "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, nullptr, 0, pHbShapers);
- assert(hb_shape_plan_execute(pHbPlan, mpHbFont, pHbBuffer, nullptr, 0));
- hb_buffer_set_content_type(pHbBuffer, HB_BUFFER_CONTENT_TYPE_GLYPHS);
- SAL_INFO("vcl.harfbuzz", hb_shape_plan_get_shaper(pHbPlan) << " shaper used for " << rArgs);
+ hb_shape(mpHbFont, pHbBuffer, nullptr, 0);
int nRunGlyphCount = hb_buffer_get_length(pHbBuffer);
hb_glyph_info_t *pHbGlyphInfos = hb_buffer_get_glyph_infos(pHbBuffer, nullptr);
@@ -455,6 +448,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
nGlyphFlags |= GlyphItem::IS_IN_CLUSTER;
bool bDiacritic = false;
+ hb_face_t* pHbFace = hb_font_get_face(mpHbFont);
if (hb_ot_layout_has_glyph_classes(pHbFace))
{
// the font has GDEF table
More information about the Libreoffice-commits
mailing list