add new API for gdi fonts (not hooked up yet)

git-svn-id: http://skia.googlecode.com/svn/trunk@8253 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-03-20 14:15:52 +00:00
Родитель cb62650ecf
Коммит f210f505ff
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -28,4 +28,12 @@ SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&);
*/
SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf);
/**
* Set an optional callback to ensure that the data behind a LOGFONT is loaded.
* This will get called if Skia tries to access the data but hits a failure.
* Normally this is null, and is only required if the font data needs to be
* remotely (re)loaded.
*/
SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&));
#endif

Просмотреть файл

@ -29,6 +29,12 @@
#include <usp10.h>
#include <objbase.h>
static void (*gEnsureLOGFONTAccessibleProc)(const LOGFONT&);
void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*proc)(const LOGFONT&)) {
gEnsureLOGFONTAccessibleProc = proc;
}
// always packed xxRRGGBB
typedef uint32_t SkGdiRGB;