Dear all,
I noticed that LibreOffice is using the hard coded harfbuzz shapers list in CommonSalLayout.cxx file
(line 470).
I recommend the patch attached to be more flexible.
This take all possible shapers in a given HarfBuzz implementation.
This also allows the use of newly created shapers.
Just repleces line:
- const char*const pHbShapers[] = { "dt", "graphite2", "coretext_aat", "ot", "fallback", nullptr };
with:
+ const char **pHbShapers = hb_shape_list_shapers();
Best regards,
Stan
===== patch
--- libreoffice-7.0.4.9/vcl/source/gdi/CommonSalLayout.cxx 2021-03-07 18:38:41.339770315 +0100
+++ libreoffice-7.0.4.x/vcl/source/gdi/CommonSalLayout.cxx 2021-03-08 12:29:37.045184836 +0100
@@ -463,11 +463,8 @@
nMinRunPos, nRunLen);
hb_buffer_set_cluster_level(pHbBuffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
- // The shapers that we want HarfBuzz to use, in the order of
- // preference. The coretext_aat shaper is available only on macOS,
- // but there is no harm in always including it, HarfBuzz will
- // ignore unavailable shapers.
- const char*const pHbShapers[] = { "dt", "graphite2", "coretext_aat", "ot", "fallback",
nullptr };
+ // Take all possible shapers in a given HarfBuzz implementation.
+ const char **pHbShapers = hb_shape_list_shapers();
bool ok = hb_shape_full(pHbFont, pHbBuffer, maFeatures.data(), maFeatures.size(),
pHbShapers);
assert(ok);
(void) ok;
--
__________________________________________________________
Stanislaw Jesmanowicz stan <at> mail2 <dot> jesmanowicz <dot> com
Amsterdam voice : + 31 20 6126193
The Netherlands mobile: + 31 653380520
--- libreoffice-7.0.4.9/vcl/source/gdi/CommonSalLayout.cxx 2021-03-07 18:38:41.339770315 +0100
+++ libreoffice-7.0.4.x/vcl/source/gdi/CommonSalLayout.cxx 2021-03-08 12:29:37.045184836 +0100
@@ -463,11 +463,8 @@
nMinRunPos, nRunLen);
hb_buffer_set_cluster_level(pHbBuffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
- // The shapers that we want HarfBuzz to use, in the order of
- // preference. The coretext_aat shaper is available only on macOS,
- // but there is no harm in always including it, HarfBuzz will
- // ignore unavailable shapers.
- const char*const pHbShapers[] = { "dt", "graphite2", "coretext_aat", "ot", "fallback", nullptr };
+ // Take all possible shapers in a given HarfBuzz implementation.
+ const char **pHbShapers = hb_shape_list_shapers();
bool ok = hb_shape_full(pHbFont, pHbBuffer, maFeatures.data(), maFeatures.size(), pHbShapers);
assert(ok);
(void) ok;
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice