Improve performance when draw with SVG fonts.
This commit is contained in:
parent
bc1f47921f
commit
ba9d9ff501
|
@ -366,13 +366,13 @@ auto VSvgFontDatabase::QueryFont(const QString &family, SVGFontStyle style, SVGF
|
|||
auto VSvgFontDatabase::QueryFontEngine(const QString &family, SVGFontStyle style, SVGFontWeight weight,
|
||||
int pointSize) const -> VSvgFontEngine
|
||||
{
|
||||
QByteArray hash = VSvgFont::Hash(family, style, weight);
|
||||
VSvgFont font = QueryFont(family, style, weight);
|
||||
QByteArray hash = font.Hash();
|
||||
if (m_fontEngineCache.contains(hash))
|
||||
{
|
||||
return {*m_fontEngineCache.object(hash)};
|
||||
}
|
||||
|
||||
VSvgFont font = QueryFont(family, style, weight);
|
||||
if (font.IsValid())
|
||||
{
|
||||
VSvgFontReader reader;
|
||||
|
|
Loading…
Reference in New Issue
Block a user