vcl/quartz/salgdi.cxx |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 3b6e9582ce43242a2304047561116bb26808408b
Author:     Khaled Hosny <kha...@aliftype.com>
AuthorDate: Sat Oct 1 14:13:25 2022 +0200
Commit:     خالد حسني <kha...@aliftype.com>
CommitDate: Sat Oct 1 16:33:26 2022 +0200

    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: خالد حسني <kha...@aliftype.com>

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 );

Reply via email to