/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
{
namespace TextAbstraction
{
+// FontClient static const value definition.
+
const PointSize26Dot6 FontClient::DEFAULT_POINT_SIZE = 768u; // 12*64
const float FontClient::DEFAULT_ITALIC_ANGLE = 12.f * Dali::Math::PI_OVER_180; // FreeType documentation states the software italic is done by doing a horizontal shear of 12 degrees (file ftsynth.h).
const uint32_t FontClient::NUMBER_OF_POINTS_PER_ONE_UNIT_OF_POINT_SIZE = 64u; //Found this value from toolkit
-FontClient::GlyphBufferData::GlyphBufferData()
-: buffer{nullptr},
- width{0u},
- height{0u},
- outlineOffsetX{0},
- outlineOffsetY{0},
- format{Pixel::A8},
- isColorEmoji{false},
- isColorBitmap{false}
-{
-}
-
-FontClient::GlyphBufferData::~GlyphBufferData()
-{
-}
+// FontClient
FontClient FontClient::Get()
{
{
}
-FontClient::FontClient(const FontClient& handle)
-: BaseHandle(handle)
-{
-}
+FontClient::FontClient(const FontClient& handle) = default;
-FontClient& FontClient::operator=(const FontClient& handle)
-{
- BaseHandle::operator=(handle);
- return *this;
-}
+FontClient& FontClient::operator=(const FontClient& handle) = default;
+
+FontClient::FontClient(FontClient&& handle) = default;
+
+FontClient& FontClient::operator=(FontClient&& handle) = default;
void FontClient::ClearCache()
{
GetImplementation(*this).GetSystemFonts(systemFonts);
}
-void FontClient::GetDescription(FontId id, FontDescription& fontDescription)
+void FontClient::GetDescription(FontId fontId, FontDescription& fontDescription)
{
- GetImplementation(*this).GetDescription(id, fontDescription);
+ GetImplementation(*this).GetDescription(fontId, fontDescription);
}
-PointSize26Dot6 FontClient::GetPointSize(FontId id)
+PointSize26Dot6 FontClient::GetPointSize(FontId fontId)
{
- return GetImplementation(*this).GetPointSize(id);
+ return GetImplementation(*this).GetPointSize(fontId);
}
bool FontClient::IsCharacterSupportedByFont(FontId fontId, Character character)
return GetImplementation(*this).GetGlyphIndex(fontId, charcode);
}
+GlyphIndex FontClient::GetGlyphIndex(FontId fontId, Character charcode, Character variantSelector)
+{
+ return GetImplementation(*this).GetGlyphIndex(fontId, charcode, variantSelector);
+}
+
bool FontClient::GetGlyphMetrics(GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal)
{
return GetImplementation(*this).GetGlyphMetrics(array, size, type, horizontal);
return Internal::FontClient::PreInitialize();
}
+void FontClientPreCache(const FontFamilyList& fallbackFamilyList, const FontFamilyList& extraFamilyList, const FontFamily& localeFamily, bool useThread)
+{
+ Internal::FontClient::PreCache(fallbackFamilyList, extraFamilyList, localeFamily, useThread);
+}
+
} // namespace TextAbstraction
} // namespace Dali