summaryrefslogtreecommitdiff
path: root/vcl/quartz/ctfonts.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/quartz/ctfonts.cxx')
-rw-r--r--vcl/quartz/ctfonts.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 11905c24d8e7..735a30b689c9 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