Commit ca39b245 authored by Jonathan Kew's avatar Jonathan Kew Committed by Pier Angelo Vendrame
Browse files

Bug 2041887 - Don't pass an empty filename to fontconfig. a=RyanVM

parent 2dd9d803
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ gfxFontEntry* gfxFontconfigFontEntry::Clone() const {
static already_AddRefed<FcPattern> CreatePatternForFace(FT_Face aFace) {
  // Use fontconfig to fill out the pattern from the FTFace.
  // The "file" argument cannot be nullptr (in fontconfig-2.6.0 at
  // least). The dummy file passed here is removed below.
  // least). The dummy filename passed here is removed below.
  //
  // When fontconfig scans the system fonts, FcConfigGetBlanks(nullptr)
  // is passed as the "blanks" argument, which provides that unexpectedly
@@ -302,8 +302,8 @@ static already_AddRefed<FcPattern> CreatePatternForFace(FT_Face aFace) {
  // "blanks", effectively assuming that, if the font has a blank glyph,
  // then the author intends any associated character to be rendered
  // blank.
  RefPtr<FcPattern> pattern =
      dont_AddRef(FcFreeTypeQueryFace(aFace, ToFcChar8Ptr(""), 0, nullptr));
  RefPtr<FcPattern> pattern = dont_AddRef(
      FcFreeTypeQueryFace(aFace, ToFcChar8Ptr("(webfont)"), 0, nullptr));
  // given that we have a FT_Face, not really sure this is possible...
  if (!pattern) {
    pattern = dont_AddRef(FcPatternCreate());
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ skip-if(!Android&&isDebugBuild) == svg-glyph-transform.svg svg-glyph-transform-r
skip-if(!Android&&isDebugBuild) == svg-glyph-extents.html svg-glyph-extents-ref.html
skip-if(!Android&&isDebugBuild) == svg-glyph-compressed.html svg-glyph-compressed-ref.html

skip-if(!Android&&isDebugBuild) fuzzy(46-77,300-600) == bug1320197-1.html bug1320197-1-ref.html
skip-if(!Android&&isDebugBuild) fuzzy(46-128,300-600) == bug1320197-1.html bug1320197-1-ref.html
skip-if(!Android&&isDebugBuild) fuzzy-if(winWidget,0-137,0-198) fuzzy-if(Android,0-81,0-144) == svg-in-ot-bitmap-1.html svg-in-ot-bitmap-1-ref.html

defaults