Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: src/core/SkTypeface.cpp

Issue 29363009: prototype for kerning api (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTypeface.cpp
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 4da27388e7e4e45d349523f7ba191cea3853debd..a45ccda185fe7747dbfbb19fdfe81f96c3cc2a0e 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -233,6 +233,20 @@ int SkTypeface::getUnitsPerEm() const {
return this->onGetUPEM();
}
+bool SkTypeface::getKerningPairAdjustments(const uint16_t glyphs[], int count,
+ int32_t adjustments[]) const {
+ SkASSERT(count >= 0);
+ // chedk for the only legal way to pass a NULL.. everthing is 0
bungeman-skia 2013/10/30 15:05:57 s/chedk/check s/everthing/everything
+ // in which case they just want to know if this face can possibly support
+ // kerning (true) or never (false).
+ if (NULL == glyphs || NULL == adjustments) {
+ SkASSERT(NULL == glyphs);
+ SkASSERT(0 == count);
+ SkASSERT(NULL == adjustments);
+ }
+ return this->onGetKerningPairAdjustments(glyphs, count, adjustments);
+}
+
SkTypeface::LocalizedStrings* SkTypeface::createFamilyNameIterator() const {
return this->onCreateFamilyNameIterator();
}
@@ -254,3 +268,11 @@ SkAdvancedTypefaceMetrics* SkTypeface::getAdvancedTypefaceMetrics(
SkTypeface* SkTypeface::refMatchingStyle(Style style) const {
return this->onRefMatchingStyle(style);
}
+
+///////////////////////////////////////////////////////////////////////////////
+
+bool SkTypeface::onGetKerningPairAdjustments(const uint16_t glyphs[], int count,
+ int32_t adjustments[]) const {
+ return false;
+}
+
« no previous file with comments | « include/core/SkTypeface.h ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698