Reviewed by Oliver Hunt.
[WebKit-https.git] / WebCore / platform / graphics / mac / FontCustomPlatformData.cpp
index 439af5049c19fba218c4e046d208d39a521145e7..3c22288c78436f47f5a8e5d0a801ed088ef65a8f 100644 (file)
@@ -64,6 +64,10 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
     }
     
     CGFontRef cgFontRef = CGFontCreateWithPlatformFont(&fontRef);
+    if (!CGFontGetNumberOfGlyphs(cgFontRef)) {
+        CFRelease(cgFontRef);
+        cgFontRef = 0;
+    }
     if (!cgFontRef) {
         ATSFontDeactivate(containerRef, NULL, kATSOptionFlagsDefault);
         return 0;