summaryrefslogtreecommitdiffstats
path: root/skia/ext/SkFontHost_fontconfig_impl.h
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 18:03:51 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 18:03:51 +0000
commit1c0d89daeb89cb344f5852720ff4ea6edad8aad3 (patch)
tree14451754940535e9d86a0f60e374a4760176a143 /skia/ext/SkFontHost_fontconfig_impl.h
parent897bd8cbf71370ec7a57446bc27e858336682632 (diff)
downloadchromium_src-1c0d89daeb89cb344f5852720ff4ea6edad8aad3.zip
chromium_src-1c0d89daeb89cb344f5852720ff4ea6edad8aad3.tar.gz
chromium_src-1c0d89daeb89cb344f5852720ff4ea6edad8aad3.tar.bz2
Make SkFontHost_fontconfig support TTC font files.
In addition to this change, third_party/skia/src/port/SkFontHost_Freetype.cpp needs a couple of lines changed. The Skia part is at http://codereview.appspot.com/1847046/show BUG=50389 TEST=Install ttf-wqy-microhei package on Ubuntu and go to http://i18nl10n.com/chrome/ttc2.html. Latin letters in the 1st line should be monospaced while they're proportional in the second line. Review URL: http://codereview.chromium.org/2870073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/SkFontHost_fontconfig_impl.h')
-rw-r--r--skia/ext/SkFontHost_fontconfig_impl.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_impl.h b/skia/ext/SkFontHost_fontconfig_impl.h
index c34f3d9..49ccc9d 100644
--- a/skia/ext/SkFontHost_fontconfig_impl.h
+++ b/skia/ext/SkFontHost_fontconfig_impl.h
@@ -34,10 +34,10 @@ class FontConfigInterface {
/** Performs config match
*
* @param result_family (output) on success, the resulting family name.
- * @param result_fileid (output) on success, the resulting file id.
- * @param fileid_valid if true, then |fileid| is valid
- * @param fileid the fileid (as returned by this function) which we are
- * trying to match.
+ * @param result_filefaceid (output) on success, the resulting fileface id.
+ * @param filefaceid_valid if true, then |filefaceid| is valid
+ * @param filefaceid the filefaceid (as returned by this function)
+ * which we are trying to match.
* @param family (optional) the family of the font that we are trying to
* match. If the length of the |family| is greater then
* kMaxFontFamilyLength, this function should immediately return false.
@@ -46,21 +46,25 @@ class FontConfigInterface {
* @param is_bold (optional, set to NULL to ignore, in/out)
* @param is_italic (optional, set to NULL to ignore, in/out)
* @return true iff successful.
+ * Note that |filefaceid| uniquely identifies <font file, face_index) :
+ * system font: filefaceid =
+ * (fileid(unique per font file) << 4 | face_index)
+ * remote font: filefaceid = fileid
*/
virtual bool Match(
std::string* result_family,
- unsigned* result_fileid,
- bool fileid_valid,
- unsigned fileid,
+ unsigned* result_filefaceid,
+ bool filefaceid_valid,
+ unsigned filefaceid,
const std::string& family,
const void* characters,
size_t characters_bytes,
bool* is_bold,
bool* is_italic) = 0;
- /** Open a font file given the fileid as returned by Match
+ /** Open a font file given the filefaceid as returned by Match.
*/
- virtual int Open(unsigned fileid) = 0;
+ virtual int Open(unsigned filefaceid) = 0;
static const unsigned kMaxFontFamilyLength = 2048;
};