projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[4.0] Support custom fonts registration
[platform/core/uifw/dali-adaptor.git]
/
text
/
dali
/
internal
/
text-abstraction
/
font-client-impl.cpp
diff --git
a/text/dali/internal/text-abstraction/font-client-impl.cpp
b/text/dali/internal/text-abstraction/font-client-impl.cpp
index
833dfdc
..
1bed788
100644
(file)
--- a/
text/dali/internal/text-abstraction/font-client-impl.cpp
+++ b/
text/dali/internal/text-abstraction/font-client-impl.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,6
+18,11
@@
// CLASS HEADER
#include <dali/internal/text-abstraction/font-client-impl.h>
// CLASS HEADER
#include <dali/internal/text-abstraction/font-client-impl.h>
+// EXTERNAL INCLUDES
+#ifndef DALI_PROFILE_UBUNTU
+#include <vconf.h>
+#endif
+
// INTERNAL INCLUDES
#include <singleton-service.h>
#include <dali/internal/text-abstraction/font-client-plugin-impl.h>
// INTERNAL INCLUDES
#include <singleton-service.h>
#include <dali/internal/text-abstraction/font-client-plugin-impl.h>
@@
-86,6
+91,17
@@
void FontClient::GetDpi( unsigned int& horizontalDpi, unsigned int& verticalDpi
verticalDpi = mDpiVertical;
}
verticalDpi = mDpiVertical;
}
+int FontClient::GetDefaultFontSize()
+{
+ int fontSize( -1 );
+
+#ifndef DALI_PROFILE_UBUNTU
+ vconf_get_int( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &fontSize );
+#endif // DALI_PROFILE_UBUNTU
+
+ return fontSize;
+}
+
void FontClient::ResetSystemDefaults()
{
CreatePlugin();
void FontClient::ResetSystemDefaults()
{
CreatePlugin();
@@
-121,6
+137,13
@@
PointSize26Dot6 FontClient::GetPointSize( FontId id )
return mPlugin->GetPointSize( id );
}
return mPlugin->GetPointSize( id );
}
+bool FontClient::IsCharacterSupportedByFont( FontId fontId, Character character )
+{
+ CreatePlugin();
+
+ return mPlugin->IsCharacterSupportedByFont( fontId, character );
+}
+
void FontClient::GetSystemFonts( FontList& systemFonts )
{
CreatePlugin();
void FontClient::GetSystemFonts( FontList& systemFonts )
{
CreatePlugin();
@@
-187,8
+210,8
@@
FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 requestedPoi
return mPlugin->GetFontId( path,
requestedPointSize,
return mPlugin->GetFontId( path,
requestedPointSize,
-
requestedPointSize
,
-
faceIndex
);
+
faceIndex
,
+
true
);
}
FontId FontClient::GetFontId( const FontDescription& fontDescription,
}
FontId FontClient::GetFontId( const FontDescription& fontDescription,
@@
-199,7
+222,6
@@
FontId FontClient::GetFontId( const FontDescription& fontDescription,
return mPlugin->GetFontId( fontDescription,
requestedPointSize,
return mPlugin->GetFontId( fontDescription,
requestedPointSize,
- requestedPointSize,
faceIndex );
}
faceIndex );
}
@@
-224,18
+246,18
@@
bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ
return mPlugin->GetGlyphMetrics( array, size, type, horizontal );
}
return mPlugin->GetGlyphMetrics( array, size, type, horizontal );
}
-void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data )
+void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data
, int outlineWidth
)
{
CreatePlugin();
{
CreatePlugin();
- mPlugin->CreateBitmap( fontId, glyphIndex, data );
+ mPlugin->CreateBitmap( fontId, glyphIndex, data
, outlineWidth
);
}
}
-PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
+PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex
, int outlineWidth
)
{
CreatePlugin();
{
CreatePlugin();
- return mPlugin->CreateBitmap( fontId, glyphIndex );
+ return mPlugin->CreateBitmap( fontId, glyphIndex
, outlineWidth
);
}
void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
}
void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight )
@@
-259,6
+281,13
@@
bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
return mPlugin->IsColorGlyph( fontId, glyphIndex );
}
return mPlugin->IsColorGlyph( fontId, glyphIndex );
}
+bool FontClient::AddCustomFontDirectory( const char* path )
+{
+ CreatePlugin();
+
+ return mPlugin->AddCustomFontDirectory( path );
+}
+
void FontClient::CreatePlugin()
{
if( !mPlugin )
void FontClient::CreatePlugin()
{
if( !mPlugin )