X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=text%2Fdali%2Fdevel-api%2Ftext-abstraction%2Ffont-client.cpp;h=c823b1b41f113a159ca106f382c99de4bff302d8;hb=60e63d023d5dabea0c560dd761fd9be6de46a27e;hp=3006d4770fd167e07d6a2e5bffaf3e06ae538ba0;hpb=00cfd12ac44dacb0ff65406f90555111f0594e4a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/text/dali/devel-api/text-abstraction/font-client.cpp b/text/dali/devel-api/text-abstraction/font-client.cpp index 3006d47..c823b1b 100644 --- a/text/dali/devel-api/text-abstraction/font-client.cpp +++ b/text/dali/devel-api/text-abstraction/font-client.cpp @@ -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 ); @@ -110,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 ) @@ -177,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 ) @@ -202,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 ) {