/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const PointSize26Dot6 FontClient::DEFAULT_POINT_SIZE = 768u; // 12*64
+FontClient::GlyphBufferData::GlyphBufferData()
+: buffer( NULL ),
+ width( 0u ),
+ height( 0u ),
+ format( Pixel::A8 )
+{
+}
+
+FontClient::GlyphBufferData::~GlyphBufferData()
+{
+}
+
FontClient FontClient::Get()
{
return Internal::FontClient::Get();
GetImplementation(*this).GetDpi( horizontalDpi, verticalDpi );
}
-void FontClient::SetDefaultFontFamily( const std::string& fontFamilyName,
- const std::string& fontStyle )
+int FontClient::GetDefaultFontSize()
+{
+ return GetImplementation(*this).GetDefaultFontSize();
+}
+
+void FontClient::ResetSystemDefaults()
{
- GetImplementation(*this).SetDefaultFontFamily( fontFamilyName, fontStyle );
+ GetImplementation(*this).ResetSystemDefaults();
}
void FontClient::GetDefaultFonts( FontList& defaultFonts )
GetImplementation(*this).GetDefaultFonts( defaultFonts );
}
+void FontClient::GetDefaultPlatformFontDescription( FontDescription& fontDescription )
+{
+ GetImplementation(*this).GetDefaultPlatformFontDescription( fontDescription );
+}
+
void FontClient::GetSystemFonts( FontList& systemFonts )
{
GetImplementation(*this).GetSystemFonts( systemFonts );
return GetImplementation(*this).GetPointSize( id );
}
-FontId FontClient::FindDefaultFont( Character charcode, PointSize26Dot6 pointSize, bool preferColor )
+bool FontClient::IsCharacterSupportedByFont( FontId fontId, Character character )
{
- return GetImplementation(*this).FindDefaultFont( charcode, pointSize, preferColor );
+ return GetImplementation(*this).IsCharacterSupportedByFont( fontId, character );
}
-FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex )
+FontId FontClient::FindDefaultFont( Character charcode,
+ PointSize26Dot6 requestedPointSize,
+ bool preferColor )
{
- return GetImplementation(*this).GetFontId( path, pointSize, faceIndex );
+ return GetImplementation(*this).FindDefaultFont( charcode,
+ requestedPointSize,
+ preferColor );
}
-FontId FontClient::GetFontId( const FontFamily& fontFamily,
- const FontStyle& fontStyle,
- PointSize26Dot6 pointSize,
+FontId FontClient::FindFallbackFont( Character charcode,
+ const FontDescription& preferredFontDescription,
+ PointSize26Dot6 requestedPointSize,
+ bool preferColor )
+{
+ return GetImplementation(*this).FindFallbackFont( charcode, preferredFontDescription, requestedPointSize, preferColor );
+}
+
+FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 requestedPointSize, FaceIndex faceIndex )
+{
+ return GetImplementation(*this).GetFontId( path, requestedPointSize, faceIndex );
+}
+
+FontId FontClient::GetFontId( const FontDescription& fontDescription,
+ PointSize26Dot6 requestedPointSize,
FaceIndex faceIndex )
{
- return GetImplementation(*this).GetFontId( fontFamily,
- fontStyle,
- pointSize,
+ return GetImplementation(*this).GetFontId( fontDescription,
+ requestedPointSize,
faceIndex );
}
bool FontClient::IsScalable( const FontPath& path )
{
- return GetImplementation(*this).IsScalable( path );;
+ return GetImplementation(*this).IsScalable( path );
}
-bool FontClient::IsScalable( const FontFamily& fontFamily, const FontStyle& style )
+bool FontClient::IsScalable( const FontDescription& fontDescription )
{
- return GetImplementation(*this).IsScalable( fontFamily, style );
+ return GetImplementation(*this).IsScalable( fontDescription );
}
void FontClient::GetFixedSizes( const FontPath& path, Dali::Vector< PointSize26Dot6>& sizes )
GetImplementation(*this).GetFixedSizes( path, sizes );
}
-void FontClient::GetFixedSizes( const FontFamily& fontFamily,
- const FontStyle& style,
+void FontClient::GetFixedSizes( const FontDescription& fontDescription,
Dali::Vector< PointSize26Dot6 >& sizes )
{
- GetImplementation(*this).GetFixedSizes( fontFamily, style, sizes );
+ GetImplementation(*this).GetFixedSizes( fontDescription, sizes );
}
-void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize )
+void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics )
{
- GetImplementation(*this).GetFontMetrics( fontId, metrics, maxFixedSize );
+ GetImplementation(*this).GetFontMetrics( fontId, metrics );
}
GlyphIndex FontClient::GetGlyphIndex( FontId fontId, Character charcode )
return GetImplementation(*this).GetGlyphIndex( fontId, charcode );
}
-bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int maxFixedSize )
+bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal )
+{
+ return GetImplementation(*this).GetGlyphMetrics( array, size, type, horizontal );
+}
+
+void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data, int outlineWidth )
+{
+ GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data, outlineWidth );
+}
+
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
+{
+ return GetImplementation(*this).CreateBitmap( fontId, glyphIndex, outlineWidth );
+}
+
+void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
{
- return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal, maxFixedSize );
+ GetImplementation(*this).CreateVectorBlob( fontId, glyphIndex, blob, blobLength, nominalWidth, nominalHeight );
}
-BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+const GlyphInfo& FontClient::GetEllipsisGlyph( PointSize26Dot6 requestedPointSize )
{
- return GetImplementation(*this).CreateBitmap( fontId, glyphIndex );
+ return GetImplementation(*this).GetEllipsisGlyph( requestedPointSize );
}
-const GlyphInfo& FontClient::GetEllipsisGlyph( PointSize26Dot6 pointSize )
+bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
{
- return GetImplementation(*this).GetEllipsisGlyph( pointSize );
+ return GetImplementation(*this).IsColorGlyph( fontId, glyphIndex );
}
FontClient::FontClient( Internal::FontClient* internal )