[4.0] FontClient - Minor refactoring.
[platform/core/uifw/dali-adaptor.git] / text / dali / devel-api / text-abstraction / font-client.cpp
index cc00057..c823b1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -30,7 +30,7 @@ namespace TextAbstraction
 const PointSize26Dot6 FontClient::DEFAULT_POINT_SIZE = 768u; // 12*64
 
 FontClient::GlyphBufferData::GlyphBufferData()
-: buffer( NULL ),
+: buffer( nullptr ),
   width( 0u ),
   height( 0u ),
   format( Pixel::A8 )
@@ -65,6 +65,11 @@ FontClient& FontClient::operator=( const FontClient& handle )
   return *this;
 }
 
+void FontClient::ClearCache()
+{
+  GetImplementation(*this).ClearCache();
+}
+
 void FontClient::SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi  )
 {
   GetImplementation(*this).SetDpi( horizontalDpi, verticalDpi );
@@ -75,6 +80,11 @@ void FontClient::GetDpi( unsigned int& horizontalDpi, unsigned int& verticalDpi
   GetImplementation(*this).GetDpi( horizontalDpi, verticalDpi );
 }
 
+int FontClient::GetDefaultFontSize()
+{
+  return GetImplementation(*this).GetDefaultFontSize();
+}
+
 void FontClient::ResetSystemDefaults()
 {
   GetImplementation(*this).ResetSystemDefaults();
@@ -105,6 +115,11 @@ PointSize26Dot6 FontClient::GetPointSize( FontId id )
   return GetImplementation(*this).GetPointSize( id );
 }
 
+bool FontClient::IsCharacterSupportedByFont( FontId fontId, Character character )
+{
+  return GetImplementation(*this).IsCharacterSupportedByFont( fontId, character );
+}
+
 FontId FontClient::FindDefaultFont( Character charcode,
                                     PointSize26Dot6 requestedPointSize,
                                     bool preferColor )
@@ -172,14 +187,14 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ
   return GetImplementation(*this).GetGlyphMetrics( array, size, type, horizontal );
 }
 
-void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data )
+void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, GlyphBufferData& data, int outlineWidth )
 {
-  GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data );
+  GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data, outlineWidth );
 }
 
-PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth )
 {
-  return GetImplementation(*this).CreateBitmap( fontId, glyphIndex );
+  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 )
@@ -197,6 +212,11 @@ bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
   return GetImplementation(*this).IsColorGlyph( fontId, glyphIndex );
 }
 
+bool FontClient::AddCustomFontDirectory( const FontPath& path )
+{
+  return GetImplementation(*this).AddCustomFontDirectory( path );
+}
+
 FontClient::FontClient( Internal::FontClient* internal )
 : BaseHandle( internal )
 {