Commit e79c29fa authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru
Browse files

Better tweaks for forward compatibility

Change-Id: I093e7a32dad529023f761b735eefbd1db6b1fca0
parent fcdba6fd
......@@ -16,6 +16,7 @@
#include "SkXfermode.h"
#ifdef SK_BUILD_FOR_ANDROID
#include "SkLanguage.h"
#include "SkPaintOptionsAndroid.h"
#endif
class SkAnnotation;
......@@ -893,6 +894,9 @@ public:
/** Returns the base glyph count for the strike associated with this paint
*/
unsigned getBaseGlyphCount(SkUnichar text) const;
SkPaintOptionsAndroid& getPaintOptionsAndroid() { return *(SkPaintOptionsAndroid*)0; }
void setPaintOptionsAndroid(const SkPaintOptionsAndroid& options) {}
#endif
// returns true if the paint's settings (e.g. xfermode + alpha) resolve to
......
/*
* Copyright 2012 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkPaintOptionsAndroid_DEFINED
#define SkPaintOptionsAndroid_DEFINED
class SkPaintOptionsAndroid {
public:
void setLanguage(const SkLanguage& language) {}
void setUseFontFallbacks(bool useFontFallbacks) {}
enum FontVariant { kElegant_Variant };
};
#endif // #ifndef SkPaintOptionsAndroid_DEFINED
......@@ -59,6 +59,7 @@ public:
/** Returns true if the typeface is fixed-width
*/
bool isFixedWidth() const { return fIsFixedWidth; }
bool isFixedPitch() const { return false; }
/** Return a 32bit value for this typeface, unique for the underlying font
data. Will never return 0.
......
......@@ -30,4 +30,8 @@ SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::S
SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style,
SkPaint::FontVariant fontVariant = SkPaint::kDefault_Variant);
SK_API SkTypeface* SkCreateTypefaceForScript(HB_Script script, SkTypeface::Style style,
SkPaintOptionsAndroid::FontVariant fontVariant) {
return SkCreateTypefaceForScript(script, style, (SkPaint::FontVariant)fontVariant);
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment