summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/wx/SimpleFontDataWx.cpp')
-rw-r--r--WebCore/platform/graphics/wx/SimpleFontDataWx.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp b/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
index ab50518..2368f83 100644
--- a/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
+++ b/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
@@ -45,7 +45,7 @@ namespace WebCore
void SimpleFontData::platformInit()
{
- wxFont *font = m_font.font();
+ wxFont *font = m_platformData.font();
if (font && font->IsOk()) {
wxFontProperties props = wxFontProperties(font);
m_ascent = props.GetAscent();
@@ -57,6 +57,13 @@ void SimpleFontData::platformInit()
}
}
+void SimpleFontData::platformCharWidthInit()
+{
+ m_avgCharWidth = 0.f;
+ m_maxCharWidth = 0.f;
+ initCharWidths();
+}
+
void SimpleFontData::platformDestroy()
{
delete m_smallCapsFontData;
@@ -81,8 +88,8 @@ bool SimpleFontData::containsCharacters(const UChar* characters, int length) con
void SimpleFontData::determinePitch()
{
- if (m_font.font() && m_font.font()->Ok())
- m_treatAsFixedPitch = m_font.font()->IsFixedWidth();
+ if (m_platformData.font() && m_platformData.font()->Ok())
+ m_treatAsFixedPitch = m_platformData.font()->IsFixedWidth();
else
m_treatAsFixedPitch = false;
}
@@ -91,7 +98,7 @@ float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
{
// TODO: fix this! Make GetTextExtents a method of wxFont in 2.9
int width = 10;
- GetTextExtent(*m_font.font(), (wxChar)glyph, &width, NULL);
+ GetTextExtent(*m_platformData.font(), (wxChar)glyph, &width, NULL);
return width;
}