aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-19 19:08:33 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-19 19:08:33 +0000
commitdb77a6a9a9bef7033aca9dffa99d52be1f51f8d9 (patch)
tree656ed293f3deae5cd9fb16133802caa56ba101d5 /src/ports
parent29c612928b26ec73c78a67313e86726fd1300ca9 (diff)
export function to return a typeface's LOGFONT
git-svn-id: http://skia.googlecode.com/svn/trunk@1903 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports')
-rwxr-xr-xsrc/ports/SkFontHost_win.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 3d057e7729..01d2421443 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -160,6 +160,17 @@ SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT& origLF) {
return face;
}
+/**
+ * This guy is public
+ */
+void SkLOGFONTFromTypeface(const SkTypeface* face, LOGFONT* lf) {
+ if (NULL == face) {
+ *lf = get_default_font();
+ } else {
+ *lf = ((const LogFontTypeface*)face)->fLogFont;
+ }
+}
+
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