[Libreoffice-commits] core.git: 2 commits - configure.ac vcl/quartz
Khaled Hosny
khaledhosny at eglug.org
Mon Nov 7 06:02:52 UTC 2016
configure.ac | 15 ++++++++-------
vcl/quartz/ctfonts.cxx | 9 +++++++++
2 files changed, 17 insertions(+), 7 deletions(-)
New commits:
commit 8285af5e56cbc9d3871f75454781ce0f5386ec08
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Mon Nov 7 07:59:49 2016 +0200
Disable VCL_FLOAT_DEVICE_PIXEL on macOS for now
Causes subtle and surprising differences, and it was only needed for the
Core Text-based layout engine, which is not the default now. We want to
use floats for our text layout everywhere at some point, though, so lets
keep the code around.
Change-Id: Iac4d0f58992646b9357a9f32c5eea8ff2729a5c0
diff --git a/configure.ac b/configure.ac
index 0d6329e..66fdc0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10175,13 +10175,14 @@ dnl ===================================================================
dnl Set vcl option: coordinate device in double or sal_Int32
dnl ===================================================================
-AC_MSG_CHECKING([Type to use for Device Pixel coordinates])
-if test "$_os" = "Darwin" -o $_os = iOS ; then
- AC_DEFINE(VCL_FLOAT_DEVICE_PIXEL)
- AC_MSG_RESULT([double])
-else
- AC_MSG_RESULT([sal_Int32])
-fi
+dnl disabled for now, we don't want subtle differences between OSs
+dnl AC_MSG_CHECKING([Type to use for Device Pixel coordinates])
+dnl if test "$_os" = "Darwin" -o $_os = iOS ; then
+dnl AC_DEFINE(VCL_FLOAT_DEVICE_PIXEL)
+dnl AC_MSG_RESULT([double])
+dnl else
+dnl AC_MSG_RESULT([sal_Int32])
+dnl fi
dnl ===================================================================
dnl Test which vclplugs have to be built.
commit bd2ff931428a7007ef639004ea6a65a2fa417cb1
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Mon Nov 7 07:52:21 2016 +0200
Set Kashida width also on macOS
Otherwise we might not get any Kashida justification at all.
Change-Id: I6521d5a267392314d5d0da84b93fcd80c7b7cc57
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 11905c2..735a30b 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -143,6 +143,15 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricDataRef& rxFontMetric ) const
rxFontMetric->SetScalableFlag( true );
rxFontMetric->SetTrueTypeFlag( true ); // Not sure, but this field is used only for Windows so far
rxFontMetric->SetKernableFlag( true );
+
+ UniChar nKashidaCh = 0x0640;
+ CGGlyph nKashidaGid = 0;
+ if (CTFontGetGlyphsForCharacters(aCTFontRef, &nKashidaCh, &nKashidaGid, 1))
+ {
+ double nKashidaAdv = CTFontGetAdvancesForGlyphs(aCTFontRef,
+ kCTFontHorizontalOrientation, &nKashidaGid, nullptr, 1);
+ rxFontMetric->SetMinKashida(lrint(nKashidaAdv));
+ }
}
bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) const
More information about the Libreoffice-commits
mailing list