projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
075f427
)
[Tizen] Support custom fonts registration
author
Seungho, Baek
<sbsh.baek@samsung.com>
Mon, 16 Jul 2018 05:45:29 +0000
(14:45 +0900)
committer
Seungho, Baek
<sbsh.baek@samsung.com>
Mon, 16 Jul 2018 05:45:32 +0000
(14:45 +0900)
This reverts commit
e4634bbf698ca3b79f1f7e8cb5dda23a784df10e
.
dali/devel-api/text-abstraction/font-client.cpp
patch
|
blob
|
history
dali/devel-api/text-abstraction/font-client.h
patch
|
blob
|
history
dali/internal/text/text-abstraction/font-client-impl.cpp
patch
|
blob
|
history
dali/internal/text/text-abstraction/font-client-impl.h
patch
|
blob
|
history
dali/internal/text/text-abstraction/font-client-plugin-impl.cpp
patch
|
blob
|
history
dali/internal/text/text-abstraction/font-client-plugin-impl.h
patch
|
blob
|
history
diff --git
a/dali/devel-api/text-abstraction/font-client.cpp
b/dali/devel-api/text-abstraction/font-client.cpp
index
43519c8
..
fb11e5c
100644
(file)
--- a/
dali/devel-api/text-abstraction/font-client.cpp
+++ b/
dali/devel-api/text-abstraction/font-client.cpp
@@
-207,6
+207,11
@@
bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
return GetImplementation(*this).IsColorGlyph( fontId, 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 )
{
FontClient::FontClient( Internal::FontClient* internal )
: BaseHandle( internal )
{
diff --git
a/dali/devel-api/text-abstraction/font-client.h
b/dali/devel-api/text-abstraction/font-client.h
index
6411b16
..
5cfe938
100755
(executable)
--- a/
dali/devel-api/text-abstraction/font-client.h
+++ b/
dali/devel-api/text-abstraction/font-client.h
@@
-406,6
+406,15
@@
public:
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
+ /**
+ * @brief Add custom fonts directory
+ *
+ * @param[in] path to the fonts directory
+ *
+ * @return true if the fonts can be added.
+ */
+ bool AddCustomFontDirectory( const FontPath& path );
+
public: // Not intended for application developers
/**
* @brief This constructor is used by FontClient::Get().
public: // Not intended for application developers
/**
* @brief This constructor is used by FontClient::Get().
diff --git
a/dali/internal/text/text-abstraction/font-client-impl.cpp
b/dali/internal/text/text-abstraction/font-client-impl.cpp
index
2d47928
..
6c71899
100644
(file)
--- a/
dali/internal/text/text-abstraction/font-client-impl.cpp
+++ b/
dali/internal/text/text-abstraction/font-client-impl.cpp
@@
-281,6
+281,13
@@
bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
return mPlugin->IsColorGlyph( fontId, glyphIndex );
}
return mPlugin->IsColorGlyph( fontId, glyphIndex );
}
+bool FontClient::AddCustomFontDirectory( const FontPath& path )
+{
+ CreatePlugin();
+
+ return mPlugin->AddCustomFontDirectory( path );
+}
+
void FontClient::CreatePlugin()
{
if( !mPlugin )
void FontClient::CreatePlugin()
{
if( !mPlugin )
diff --git
a/dali/internal/text/text-abstraction/font-client-impl.h
b/dali/internal/text/text-abstraction/font-client-impl.h
index
cfa3a20
..
13d847b
100644
(file)
--- a/
dali/internal/text/text-abstraction/font-client-impl.h
+++ b/
dali/internal/text/text-abstraction/font-client-impl.h
@@
-193,6
+193,11
@@
public:
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
+ /**
+ * @copydoc Dali::TextAbstraction::FontClient::AddCustomFontDirectory()
+ */
+ bool AddCustomFontDirectory( const FontPath& path );
+
private:
/**
private:
/**
diff --git
a/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp
b/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp
index
14efb7b
..
f7fc5cb
100644
(file)
--- a/
dali/internal/text/text-abstraction/font-client-plugin-impl.cpp
+++ b/
dali/internal/text/text-abstraction/font-client-plugin-impl.cpp
@@
-1274,6
+1274,12
@@
bool FontClient::Plugin::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex )
return FT_Err_Ok == error;
}
return FT_Err_Ok == error;
}
+bool FontClient::Plugin::AddCustomFontDirectory( const FontPath& path )
+{
+ // NULL as first parameter means the current configuration is used.
+ return FcConfigAppFontAddDir( NULL, reinterpret_cast<const FcChar8 *>( path.c_str() ) );
+}
+
void FontClient::Plugin::InitSystemFonts()
{
DALI_LOG_INFO( gLogFilter, Debug::General, "-->FontClient::Plugin::InitSystemFonts\n" );
void FontClient::Plugin::InitSystemFonts()
{
DALI_LOG_INFO( gLogFilter, Debug::General, "-->FontClient::Plugin::InitSystemFonts\n" );
diff --git
a/dali/internal/text/text-abstraction/font-client-plugin-impl.h
b/dali/internal/text/text-abstraction/font-client-plugin-impl.h
index
3ada20c
..
0af3278
100644
(file)
--- a/
dali/internal/text/text-abstraction/font-client-plugin-impl.h
+++ b/
dali/internal/text/text-abstraction/font-client-plugin-impl.h
@@
-321,6
+321,11
@@
struct FontClient::Plugin
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
*/
bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex );
+ /**
+ * @copydoc Dali::TextAbstraction::FontClient::AddCustomFontDirectory()
+ */
+ bool AddCustomFontDirectory( const FontPath& path );
+
private:
/**
private:
/**