https://bugs.documentfoundation.org/show_bug.cgi?id=105454

--- Comment #12 from Khaled Hosny <[email protected]> ---
(In reply to Miklos Vajna from comment #11)
> OK, sounds like there are two issues here, then:
> 
> 1) The kerning character property is not respected by CSL.
> 
> 2) There is no character property that could tell CSL to or not to enable
> ligatures.
> 
> Would it be OK to focus on kerning in this bugreport, and create a
> follow-up bug for the ligature problem? If so and it helps, I can
> create a trivial test doc that has kerning enabled and disabled
> for testing purposes.

Sounds fine. Disabling the kerning in CSL is trivial, something like:

diff --git a/vcl/source/gdi/CommonSalLayout.cxx
b/vcl/source/gdi/CommonSalLayout.cxx
index 34514788d949..94afb7dc4107 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -446,6 +446,12 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
     hb_buffer_set_unicode_funcs(pHbBuffer, pHbUnicodeFuncs);
 #endif

+    if (!(rArgs.mnFlags & SalLayoutFlags::KerningPairs))
+    {
+        SAL_DEBUG("Disabling kerning");
+        maFeatures.push_back({ HB_TAG('k','e','r','n'), 0, 0,
static_cast<unsigned int>(-1) });
+    }
+
     ParseFeatures(mrFontSelData.maTargetName);

     double nXScale = 0;


Which seems to work actually, but we seem to not set the flag on UI text, I
guess that what I saw back in the day (or things changed since 2013 when I last
checked that). So I guess we can just do the code above and make sure the flag
is set for UI text as there is no point disabling it there.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to