GetImplementation(*this).GetFixedSizes( fontDescription, sizes );
}
-void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize )
+void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize )
{
- GetImplementation(*this).GetFontMetrics( fontId, metrics, maxFixedSize );
+ GetImplementation(*this).GetFontMetrics( fontId, metrics, desiredFixedSize );
}
GlyphIndex FontClient::GetGlyphIndex( FontId fontId, Character charcode )
return GetImplementation(*this).GetGlyphIndex( fontId, charcode );
}
-bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int maxFixedSize )
+bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int desiredFixedSize )
{
- return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal, maxFixedSize );
+ return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal, desiredFixedSize );
}
BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
*
* @param[in] fontId The ID of the font for the required glyph.
* @param[out] metrics The font metrics.
- * @param[in] maxFixedSize The metrics for fixed-size fonts will be down-scaled, when exceeding this maximum value in pixels.
+ * @param[in] desiredFixedSize The metrics for fixed-size fonts will be scaled to this desired size (in pixels).
*/
- void GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize = 0 );
+ void GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize = 0 );
/**
* @brief Retrieve the glyph index for a UTF-32 character code.
* On return, the glyph's size value will be initialized. The bearing value will be updated by adding the font's glyph bearing to the one set by the shaping tool.
* @param[in] size The size of the array.
* @param[in] horizontal True for horizontal layouts (set to false for vertical layouting).
- * @param[in] maxFixedSize The metrics for fixed-size fonts will be down-scaled, when exceeding this maximum value in pixels.
+ * @param[in] desiredFixedSize The metrics for fixed-size fonts will be scaled to this desired size (in pixels).
* @return True if all of the requested metrics were found.
*/
- bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal = true, int maxFixedSize = 0 );
+ bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal = true, int desiredFixedSize = 0 );
/**
* @brief Render a bitmap representation of a glyph.
faceIndex );
}
-void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize )
+void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize )
{
CreatePlugin();
- return mPlugin->GetFontMetrics( fontId, metrics, maxFixedSize );
+ return mPlugin->GetFontMetrics( fontId, metrics, desiredFixedSize );
}
GlyphIndex FontClient::GetGlyphIndex( FontId fontId, Character charcode )
return mPlugin->GetGlyphIndex( fontId, charcode );
}
-bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int maxFixedSize )
+bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int desiredFixedSize )
{
CreatePlugin();
- return mPlugin->GetGlyphMetrics( array, size, horizontal, maxFixedSize );
+ return mPlugin->GetGlyphMetrics( array, size, horizontal, desiredFixedSize );
}
BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex )
/**
* @copydoc Dali::FontClient::GetFontMetrics()
*/
- void GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize );
+ void GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize );
/**
* @copydoc Dali::FontClient::GetGlyphIndex()
/**
* @copydoc Dali::FontClient::GetGlyphMetrics()
*/
- bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int maxFixedSize );
+ bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int desiredFixedSize );
/**
* @copydoc Dali::FontClient::CreateBitmap()
void FontClient::Plugin::GetFontMetrics( FontId fontId,
FontMetrics& metrics,
- int maxFixedSize )
+ int desiredFixedSize )
{
if( fontId > 0 &&
fontId-1 < mFontCache.size() )
// Adjust the metrics if the fixed-size font should be down-scaled
if( font.mIsFixedSizeBitmap &&
- ( maxFixedSize > 0 ) &&
- ( font.mFixedHeightPixels > maxFixedSize ) )
+ ( desiredFixedSize > 0 ) )
{
- float scaleFactor = static_cast<float>(maxFixedSize) / static_cast<float>(font.mFixedHeightPixels);
+ float scaleFactor = static_cast<float>(desiredFixedSize) / static_cast<float>(font.mFixedHeightPixels);
metrics.ascender *= scaleFactor;
metrics.descender *= scaleFactor;
bool FontClient::Plugin::GetGlyphMetrics( GlyphInfo* array,
uint32_t size,
bool horizontal,
- int maxFixedSize )
+ int desiredFixedSize )
{
bool success( true );
array[i].yBearing = font.mFixedHeightPixels;
// Adjust the metrics if the fixed-size font should be down-scaled
- if( ( maxFixedSize > 0 ) &&
- ( font.mFixedHeightPixels > maxFixedSize ) )
+ if( desiredFixedSize > 0 )
{
- float scaleFactor = static_cast<float>(maxFixedSize) / static_cast<float>(font.mFixedHeightPixels);
+ float scaleFactor = static_cast<float>(desiredFixedSize) / static_cast<float>(font.mFixedHeightPixels);
array[i].width *= scaleFactor;
array[i].height *= scaleFactor;
/**
* @copydoc Dali::FontClient::GetFontMetrics()
*/
- void GetFontMetrics( FontId fontId, FontMetrics& metrics, int maxFixedSize );
+ void GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize );
/**
* @copydoc Dali::FontClient::GetGlyphIndex()
/**
* @copydoc Dali::FontClient::GetGlyphMetrics()
*/
- bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int maxFixedSize );
+ bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int desiredFixedSize );
/**
* @copydoc Dali::FontClient::CreateBitmap()