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 <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Chris Sherlock
2021-10-10 03:45:37 +11:00
committed by Mike Kaganski
parent 21b2c6b7d8
commit d389a54e64

View File

@@ -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