diff options
author | 2011-07-19 19:08:33 +0000 | |
---|---|---|
committer | 2011-07-19 19:08:33 +0000 | |
commit | db77a6a9a9bef7033aca9dffa99d52be1f51f8d9 (patch) | |
tree | 656ed293f3deae5cd9fb16133802caa56ba101d5 /src/ports | |
parent | 29c612928b26ec73c78a67313e86726fd1300ca9 (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-x | src/ports/SkFontHost_win.cpp | 11 |
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 |