diff options
author | Khaled Hosny <khaled@aliftype.com> | 2022-10-01 14:13:25 +0200 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2022-10-01 16:33:26 +0200 |
commit | 3b6e9582ce43242a2304047561116bb26808408b (patch) | |
tree | d881cea00f7f462f476bd2d31fb43ca09f5a194a /vcl/quartz | |
parent | 5aad191eae5366c6892dc51b85171bbe3db7b60d (diff) |
tdf#72456: Don’t cache macOS font list
The “system” font list is used for both actual system fonts and fonts we
add with AddTempDevFont(), so the caching makes loading embedded fonts
broken the first time the file is opened, requiring a next open without
closing the application.
The callers, I think, are careful not to call GetDevFontList() unless
they really want to refresh the font list, so the caching is probably
superfluous if not wrong.
Change-Id: Ie14cc473a64425fd5270bc65ffd61dea2d873cfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140840
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salgdi.cxx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 54127bc07b22..aa5c5ca598ef 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -278,17 +278,8 @@ void AquaSalGraphics::GetDevFontList(vcl::font::PhysicalFontCollection* pFontCol AddLocalTempFontDirs(); - // The idea is to cache the list of system fonts once it has been generated. - // SalData seems to be a good place for this caching. However we have to - // carefully make the access to the font list thread-safe. If we register - // a font-change event handler to update the font list in case fonts have - // changed on the system we have to lock access to the list. The right - // way to do that is the solar mutex since GetDevFontList is protected - // through it as should be all event handlers - SalData* pSalData = GetSalData(); - if( !pSalData->mpFontList ) - pSalData->mpFontList = GetCoretextFontList(); + pSalData->mpFontList = GetCoretextFontList(); // Copy all PhysicalFontFace objects contained in the SystemFontList pSalData->mpFontList->AnnounceFonts( *pFontCollection ); |