* corresponding typeface for the specified logfont. The caller is responsible
* for calling unref() when it is finished.
*/
-SK_API extern SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&);
+SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&);
+
+/**
+ * Copy the LOGFONT associated with this typeface into the lf parameter. Note
+ * that the lfHeight will need to be set afterwards, since the typeface does
+ * not track this (the paint does).
+ * typeface may be NULL, in which case we return the logfont for the default font.
+ */
+SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf);
#endif
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