aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPaint.cpp3
-rw-r--r--src/core/SkScalerContext.cpp2
-rw-r--r--src/ports/SkFontHost_android.cpp4
-rw-r--r--src/ports/SkFontHost_fontconfig.cpp3
-rw-r--r--src/ports/SkFontHost_linux.cpp2
-rw-r--r--src/ports/SkFontHost_mac_atsui.cpp4
-rw-r--r--src/ports/SkFontHost_mac_coretext.cpp4
-rw-r--r--src/ports/SkFontHost_none.cpp2
-rw-r--r--src/ports/SkFontHost_simple.cpp4
-rwxr-xr-xsrc/ports/SkFontHost_win.cpp2
10 files changed, 15 insertions, 15 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index b7b6a34e1d..f9abe3f420 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1234,7 +1234,8 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
const SkMatrix* deviceMatrix, Rec* rec) {
SkASSERT(deviceMatrix == NULL || !deviceMatrix->hasPerspective());
- rec->fFontID = SkTypeface::UniqueID(paint.getTypeface());
+ rec->fOrigFontID = SkTypeface::UniqueID(paint.getTypeface());
+ rec->fFontID = rec->fOrigFontID;
rec->fTextSize = paint.getTextSize();
rec->fPreScaleX = paint.getTextScaleX();
rec->fPreSkewX = paint.getTextSkewX();
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 6b5f663f85..05439f1f55 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -180,7 +180,7 @@ static SkScalerContext* allocNextContext(const SkScalerContext::Rec& rec) {
// fonthost will determine the next possible font to search, based
// on the current font in fRec. It will return NULL if ctx is our
// last font that can be searched (i.e. ultimate fallback font)
- uint32_t newFontID = SkFontHost::NextLogicalFont(rec.fFontID);
+ uint32_t newFontID = SkFontHost::NextLogicalFont(rec.fFontID, rec.fOrigFontID);
if (0 == newFontID) {
return NULL;
}
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp
index d01577d695..e9b398688f 100644
--- a/src/ports/SkFontHost_android.cpp
+++ b/src/ports/SkFontHost_android.cpp
@@ -632,7 +632,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
}
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
load_system_fonts();
/* First see if fontID is already one of our fallbacks. If so, return
@@ -642,7 +642,7 @@ uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
*/
const uint32_t* list = gFallbackFonts;
for (int i = 0; list[i] != 0; i++) {
- if (list[i] == fontID) {
+ if (list[i] == currFontID) {
return list[i+1];
}
}
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 21fc7739b3..332c911e10 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -364,8 +364,7 @@ SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
return NULL;
}
-// static
-uint32_t SkFontHost::NextLogicalFont(SkFontID fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
// We don't handle font fallback, WebKit does.
return 0;
}
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index 37c2c35eb2..9ede78c50b 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -578,7 +578,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
return 0;
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
return 0;
}
diff --git a/src/ports/SkFontHost_mac_atsui.cpp b/src/ports/SkFontHost_mac_atsui.cpp
index 5bc438a4b6..fb61c6068a 100644
--- a/src/ports/SkFontHost_mac_atsui.cpp
+++ b/src/ports/SkFontHost_mac_atsui.cpp
@@ -491,9 +491,9 @@ SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
return new SkScalerContext_Mac(desc);
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
uint32_t newFontID = find_default_fontID();
- if (newFontID == fontID) {
+ if (newFontID == currFontID) {
newFontID = 0;
}
return newFontID;
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp
index ad57e16f91..f9eba95c7b 100644
--- a/src/ports/SkFontHost_mac_coretext.cpp
+++ b/src/ports/SkFontHost_mac_coretext.cpp
@@ -887,10 +887,10 @@ SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
return new SkScalerContext_Mac(desc);
}
-SkFontID SkFontHost::NextLogicalFont(SkFontID fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
SkFontID nextFontID = 0;
SkTypeface* face = GetDefaultFace();
- if (face->uniqueID() != fontID) {
+ if (face->uniqueID() != currFontID) {
nextFontID = face->uniqueID();
}
return nextFontID;
diff --git a/src/ports/SkFontHost_none.cpp b/src/ports/SkFontHost_none.cpp
index 91546f8043..0593dd5c4e 100644
--- a/src/ports/SkFontHost_none.cpp
+++ b/src/ports/SkFontHost_none.cpp
@@ -80,7 +80,7 @@ SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
return NULL;
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
return 0;
}
diff --git a/src/ports/SkFontHost_simple.cpp b/src/ports/SkFontHost_simple.cpp
index 54d326efb2..d63aec2076 100644
--- a/src/ports/SkFontHost_simple.cpp
+++ b/src/ports/SkFontHost_simple.cpp
@@ -620,7 +620,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
}
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
load_system_fonts();
/* First see if fontID is already one of our fallbacks. If so, return
@@ -630,7 +630,7 @@ uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
*/
const uint32_t* list = gFallbackFonts;
for (int i = 0; list[i] != 0; i++) {
- if (list[i] == fontID) {
+ if (list[i] == currFontID) {
return list[i+1];
}
}
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index f5d126ea6f..62b0a0c358 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -179,7 +179,7 @@ SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT& origLF) {
return face;
}
-uint32_t SkFontHost::NextLogicalFont(uint32_t fontID) {
+SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
// Zero means that we don't have any fallback fonts for this fontID.
// This function is implemented on Android, but doesn't have much
// meaning here.