FontConfig - Remove the font format from the match pattern. 77/200777/1
authorVictor Cebollada <v.cebollada@samsung.com>
Fri, 21 Dec 2018 15:21:46 +0000 (15:21 +0000)
committerJoogab Yun <joogab.yun@samsung.com>
Mon, 4 Mar 2019 07:18:18 +0000 (16:18 +0900)
* Is not possible to select fonts with a font format
  different than True Type.
* By default "TrueType" is added to the pattern used by
  FontConfig to match a font. This apparently makes
  impossible to select a font with a different format.

Change-Id: I46971d3a6e9bcc8bbe5109bc20ebbbc71a2a1792

dali/internal/text/text-abstraction/font-client-plugin-impl.cpp

index 453dc04..0bccb96 100755 (executable)
@@ -45,7 +45,6 @@ Dali::Integration::Log::Filter* gLogFilter = Dali::Integration::Log::Filter::New
 const float FROM_266 = 1.0f / 64.0f;
 const float POINTS_PER_INCH = 72.f;
 
-const std::string FONT_FORMAT( "TrueType" );
 const std::string DEFAULT_FONT_FAMILY_NAME( "Tizen" );
 const int DEFAULT_FONT_WIDTH  = 100; // normal
 const int DEFAULT_FONT_WEIGHT =  80; // normal
@@ -1891,9 +1890,6 @@ FcPattern* FontClient::Plugin::CreateFontFamilyPattern( const FontDescription& f
   FcPatternAddInteger( fontFamilyPattern, FC_WEIGHT, weight );
   FcPatternAddInteger( fontFamilyPattern, FC_SLANT, slant );
 
-  // Add a property of the pattern, to say we want to match TrueType fonts
-  FcPatternAddString( fontFamilyPattern , FC_FONTFORMAT, reinterpret_cast<const FcChar8*>( FONT_FORMAT.c_str() ) );
-
   // modify the config, with the mFontFamilyPatterm
   FcConfigSubstitute( nullptr /* use default configure */, fontFamilyPattern, FcMatchPattern );