vcl/quartz/ctfonts.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit d389a54e64accc3f46c1a646f947e9af9badd08e
Author: Chris Sherlock <[email protected]>
AuthorDate: Sun Oct 10 03:45:37 2021 +1100
Commit: Mike Kaganski <[email protected]>
CommitDate: Sun Oct 10 07:49:21 2021 +0200
tdf#144757 - fixed fonts not shown in font list
When in font options, the Fonts in "Font Setting for HTML, Basic and SQL
Sources" were not showing any fixed (non-proportional) fonts in the list
when "Non-proportional fonts only" was ticked.
The reason this was occuring was because we were not populating the
fixed font attribute when getting the CT font descriptor.
Change-Id: I06127ac48bd0f3bc9b70217b36bbf584a1b0fdc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123316
Reviewed-by: Noel Grandin <[email protected]>
Reviewed-by: Mike Kaganski <[email protected]>
Tested-by: Jenkins
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 7de60b88f24d..f7c922b8aa9e 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -376,6 +376,9 @@ FontAttributes DevFontFromCTFontDescriptor(
CTFontDescriptorRef pFD, bool* bFont
{
CFNumberGetValue( pSymbolNum, kCFNumberSInt64Type, &nSymbolTrait );
rDFA.SetSymbolFlag( (nSymbolTrait & kCTFontClassMaskTrait) ==
kCTFontSymbolicClass );
+
+ if (nSymbolTrait & kCTFontMonoSpaceTrait)
+ rDFA.SetPitch(PITCH_FIXED);
}
// get the font weight