Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: webkit/port/platform/graphics/FontWin.cpp

Issue 10785: Debase our Uniscribe code. This moves FontUtils and all our Uniscribe code fr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/port/platform/graphics/FontWin.cpp
===================================================================
--- webkit/port/platform/graphics/FontWin.cpp (revision 5555)
+++ webkit/port/platform/graphics/FontWin.cpp (working copy)
@@ -32,7 +32,7 @@
#include "GlyphBuffer.h"
#include "PlatformContextSkia.h"
#include "SimpleFontData.h"
-#include "UniscribeStateTextRun.h"
+#include "UniscribeHelperTextRun.h"
#include "base/gfx/platform_canvas_win.h"
#include "base/gfx/skia_utils.h"
@@ -134,7 +134,7 @@
int from,
int to) const
{
- UniscribeStateTextRun state(run, *this);
+ UniscribeHelperTextRun state(run, *this);
float left = static_cast<float>(point.x() + state.CharacterToX(from));
float right = static_cast<float>(point.x() + state.CharacterToX(to));
@@ -154,7 +154,7 @@
int to) const
{
PlatformGraphicsContext* context = graphicsContext->platformContext();
- UniscribeStateTextRun state(run, *this);
+ UniscribeHelperTextRun state(run, *this);
SkColor color = context->fillColor();
uint8 alpha = SkColorGetA(color);
@@ -184,15 +184,16 @@
float Font::floatWidthForComplexText(const TextRun& run) const
{
- UniscribeStateTextRun state(run, *this);
+ UniscribeHelperTextRun state(run, *this);
return static_cast<float>(state.Width());
}
-int Font::offsetForPositionForComplexText(const TextRun& run, int x, bool includePartialGlyphs) const
+int Font::offsetForPositionForComplexText(const TextRun& run, int x,
+ bool includePartialGlyphs) const
{
// Mac code ignores includePartialGlyphs, and they don't know what it's
// supposed to do, so we just ignore it as well.
- UniscribeStateTextRun state(run, *this);
+ UniscribeHelperTextRun state(run, *this);
int char_index = state.XToCharacter(x);
// XToCharacter will return -1 if the position is before the first

Powered by Google App Engine
This is Rietveld 408576698