summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/wx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/wx')
-rw-r--r--Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp2
-rw-r--r--Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h4
-rw-r--r--Source/WebCore/platform/graphics/wx/FontPlatformData.h4
-rw-r--r--Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp2
-rw-r--r--Source/WebCore/platform/graphics/wx/FontWx.cpp10
-rw-r--r--Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp4
-rw-r--r--Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp12
7 files changed, 27 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp b/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
index 6133372..055f0fc 100644
--- a/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
+++ b/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.cpp
@@ -31,7 +31,7 @@ FontCustomPlatformData::~FontCustomPlatformData()
{
}
-FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontRenderingMode)
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation, FontWidthVariant, FontRenderingMode)
{
return FontPlatformData(size, bold, italic);
}
diff --git a/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h b/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h
index 86f99b2..c975296 100644
--- a/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h
+++ b/Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h
@@ -23,7 +23,9 @@
#include "FontOrientation.h"
#include "FontRenderingMode.h"
+#include "FontWidthVariant.h"
#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
namespace WebCore {
@@ -38,7 +40,7 @@ namespace WebCore {
static bool supportsFormat(const String&);
- FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontRenderingMode = NormalRenderingMode);
+ FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth, FontRenderingMode = NormalRenderingMode);
};
FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
diff --git a/Source/WebCore/platform/graphics/wx/FontPlatformData.h b/Source/WebCore/platform/graphics/wx/FontPlatformData.h
index 9ae8b54..3ef0179 100644
--- a/Source/WebCore/platform/graphics/wx/FontPlatformData.h
+++ b/Source/WebCore/platform/graphics/wx/FontPlatformData.h
@@ -30,6 +30,7 @@
#define FontPlatformData_h
#include "FontDescription.h"
+#include "FontWidthVariant.h"
#include "FontOrientation.h"
#include "StringImpl.h"
#include <wtf/Forward.h>
@@ -150,6 +151,9 @@ public:
FontOrientation orientation() const { return Horizontal; } // FIXME: Implement.
+ // We don't support this yet, so just return the default value for now.
+ FontWidthVariant widthVariant() const { return RegularWidth; }
+
#if OS(WINDOWS)
bool useGDI() const;
HFONT hfont() const;
diff --git a/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp b/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
index 66c69ee..c125b7c 100644
--- a/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
+++ b/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
@@ -126,7 +126,7 @@ unsigned FontPlatformData::computeHash() const
thisFont->GetStyle(),
thisFont->GetWeight(),
thisFont->GetUnderlined(),
- StringImpl::computeHash(thisFont->GetFaceName().utf8_str())
+ WTF::StringHasher::createHash(thisFont->GetFaceName().utf8_str().data())
};
return WTF::StringHasher::createBlobHash<sizeof(hashCodes)>(hashCodes);
diff --git a/Source/WebCore/platform/graphics/wx/FontWx.cpp b/Source/WebCore/platform/graphics/wx/FontWx.cpp
index c01e249..c48f3c7 100644
--- a/Source/WebCore/platform/graphics/wx/FontWx.cpp
+++ b/Source/WebCore/platform/graphics/wx/FontWx.cpp
@@ -32,6 +32,7 @@
#include "IntRect.h"
#include "NotImplemented.h"
#include "SimpleFontData.h"
+#include "TextRun.h"
#if OS(WINDOWS)
#include "UniscribeController.h"
@@ -57,6 +58,15 @@ bool Font::canReturnFallbackFontsForComplexText()
#endif
}
+bool Font::canExpandAroundIdeographsInComplexText()
+{
+#if OS(DARWIN)
+ return true;
+#else
+ return false;
+#endif
+}
+
void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
int from, int numGlyphs, const FloatPoint& point) const
{
diff --git a/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index f1c09c5..991be79 100644
--- a/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -515,7 +515,7 @@ void GraphicsContext::fillPath(const Path& path)
#if USE(WXGC)
wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
if (gc)
- gc->FillPath(path.platformPath());
+ gc->FillPath(*path.platformPath());
#endif
}
@@ -524,7 +524,7 @@ void GraphicsContext::strokePath(const Path& path)
#if USE(WXGC)
wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
if (gc)
- gc->StrokePath(path.platformPath());
+ gc->StrokePath(*path.platformPath());
#endif
}
diff --git a/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp b/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
index 0e24bfc..4f24e4c 100644
--- a/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
+++ b/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp
@@ -53,12 +53,12 @@ void SimpleFontData::platformInit()
wxFont *font = m_platformData.font();
if (font && font->IsOk()) {
wxFontProperties props = wxFontProperties(font);
- m_ascent = props.GetAscent();
- m_descent = props.GetDescent();
- m_lineSpacing = props.GetLineSpacing();
- m_xHeight = props.GetXHeight();
- m_unitsPerEm = 1; // FIXME!
- m_lineGap = props.GetLineGap();
+ m_fontMetrics.setAscent(props.GetAscent());
+ m_fontMetrics.setDescent(props.GetDescent());
+ m_fontMetrics.setXHeight(props.GetXHeight());
+ m_fontMetrics.setUnitsPerEm(1); // FIXME!
+ m_fontMetrics.setLineGap(props.GetLineGap());
+ m_fontMetrics.setLineSpacing(props.GetLineSpacing());
}
m_syntheticBoldOffset = 0.0f;