Bugzilla – Attachment 140056 Details for
Bug 67744
FORMATTING: Adobe Courier Std font is always bold on Mac OS X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add debug output from the macOS font enumeration in LO
FONT-ENUMERATION-DEBUG.diff (text/plain), 3.01 KB, created by
How can I remove my account?
on 2018-02-22 11:26:38 UTC
(
hide
)
Description:
Patch to add debug output from the macOS font enumeration in LO
Filename:
MIME Type:
Creator:
How can I remove my account?
Created:
2018-02-22 11:26:38 UTC
Size:
3.01 KB
patch
obsolete
>diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx >index dbe4eb2cb96e..26eda7b7753a 100644 >--- a/vcl/quartz/ctfonts.cxx >+++ b/vcl/quartz/ctfonts.cxx >@@ -1,4 +1,4 @@ >-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ >+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ > /* > * This file is part of the LibreOffice project. > * >@@ -52,6 +52,8 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) > , mpStyleDict( nullptr ) > , mpHbFont( nullptr ) > { >+ SAL_DEBUG("CoreTextStyle ctor " << mpFontData->GetFamilyName() << " " << mpFontData->GetStyleName()); >+ > const FontSelectPattern* const pReqFont = &rFSD; > > double fScaledFontHeight = pReqFont->mfExactHeight; >@@ -398,6 +400,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont > nInt = WEIGHT_THIN; > } > } >+ SAL_DEBUG("==> " << rDFA.GetFamilyName() << ": " << rDFA.GetStyleName() << " weight=" << fWeight << " -> " << nInt); > rDFA.SetWeight( static_cast<FontWeight>(nInt) ); > > // get the font slant >@@ -430,6 +433,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont > nInt = WIDTH_ULTRA_CONDENSED; > } > } >+ SAL_DEBUG("==> " << rDFA.GetFamilyName() << ": " << rDFA.GetStyleName() << " width=" << fWidth << " -> " << nInt); > rDFA.SetWidthType( static_cast<FontWidth>(nInt) ); > > // release the attribute dict that we had copied >@@ -483,12 +487,14 @@ SystemFontList::~SystemFontList() > > void SystemFontList::AddFont( CoreTextFontFace* pFontData ) > { >+ SAL_DEBUG("===> AddFont: " << pFontData->GetFamilyName() << ": " << pFontData->GetStyleName() << " w=" << (int)pFontData->GetWeight() << " i=" << (int)pFontData->GetItalic() << " id=" << pFontData->GetFontId()); > sal_IntPtr nFontId = pFontData->GetFontId(); > maFontContainer[ nFontId ] = pFontData; > } > > void SystemFontList::AnnounceFonts( PhysicalFontCollection& rFontCollection ) const > { >+ SAL_DEBUG("===> AnnounceFonts"); > auto it = maFontContainer.cbegin(); > for(; it != maFontContainer.cend(); ++it ) > { >@@ -524,6 +530,23 @@ bool SystemFontList::Init() > const CFRange aFullRange = CFRangeMake( 0, nFontCount ); > CFArrayApplyFunction( mpCTFontArray, aFullRange, fontEnumCallBack, this ); > >+ // Look for typefaces that have more than the traditional Regular, Bold, Italic, and Bold-Italic >+ // styles, and try to generate additional "fake" typefaces for them. >+ for (auto pFont = maFontContainer.begin(); pFont != maFontContainer.end(); ++pFont) >+ { >+ int nStyles = 0; >+ auto p2 = pFont; >+ ++p2; >+ while (p2 != maFontContainer.end()) >+ { >+ if ((*p2).second->GetFamilyName() == (*pFont).second->GetFamilyName()) >+ nStyles++; >+ ++p2; >+ } >+ if (nStyles > 4) >+ SAL_DEBUG("Family " << (*pFont).second->GetFamilyName() << " has " << nStyles << " styles"); >+ } >+ > return true; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 67744
:
83615
|
83616
|
137182
|
137184
| 140056