From d389a54e64accc3f46c1a646f947e9af9badd08e Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 10 Oct 2021 03:45:37 +1100 Subject: 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 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- vcl/quartz/ctfonts.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vcl/quartz') 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 -- cgit