summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
committerFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
commit1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch)
treecad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
parentb83fc086000e27bc227580bd0e35b9d7bee1179a (diff)
parentc9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff)
downloadexternal_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
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;
}