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

Side by Side Diff: src/ports/SkFontHost_FreeType.cpp

Issue 99453005: Actually mark other types of fonts as 'kOther' in FreeType port. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } else if (strcmp(fontType, "CFF") == 0) { 509 } else if (strcmp(fontType, "CFF") == 0) {
510 info->fType = SkAdvancedTypefaceMetrics::kCFF_Font; 510 info->fType = SkAdvancedTypefaceMetrics::kCFF_Font;
511 } else if (strcmp(fontType, "TrueType") == 0) { 511 } else if (strcmp(fontType, "TrueType") == 0) {
512 info->fType = SkAdvancedTypefaceMetrics::kTrueType_Font; 512 info->fType = SkAdvancedTypefaceMetrics::kTrueType_Font;
513 cid = true; 513 cid = true;
514 TT_Header* ttHeader; 514 TT_Header* ttHeader;
515 if ((ttHeader = (TT_Header*)FT_Get_Sfnt_Table(face, 515 if ((ttHeader = (TT_Header*)FT_Get_Sfnt_Table(face,
516 ft_sfnt_head)) != NULL) { 516 ft_sfnt_head)) != NULL) {
517 info->fEmSize = ttHeader->Units_Per_EM; 517 info->fEmSize = ttHeader->Units_Per_EM;
518 } 518 }
519 } else {
520 info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
519 } 521 }
520 522
521 info->fStyle = 0; 523 info->fStyle = 0;
522 if (FT_IS_FIXED_WIDTH(face)) 524 if (FT_IS_FIXED_WIDTH(face))
523 info->fStyle |= SkAdvancedTypefaceMetrics::kFixedPitch_Style; 525 info->fStyle |= SkAdvancedTypefaceMetrics::kFixedPitch_Style;
524 if (face->style_flags & FT_STYLE_FLAG_ITALIC) 526 if (face->style_flags & FT_STYLE_FLAG_ITALIC)
525 info->fStyle |= SkAdvancedTypefaceMetrics::kItalic_Style; 527 info->fStyle |= SkAdvancedTypefaceMetrics::kItalic_Style;
526 528
527 PS_FontInfoRec ps_info; 529 PS_FontInfoRec ps_info;
528 TT_Postscript* tt_info; 530 TT_Postscript* tt_info;
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 *style = (SkTypeface::Style) tempStyle; 1523 *style = (SkTypeface::Style) tempStyle;
1522 } 1524 }
1523 if (isFixedPitch) { 1525 if (isFixedPitch) {
1524 *isFixedPitch = FT_IS_FIXED_WIDTH(face); 1526 *isFixedPitch = FT_IS_FIXED_WIDTH(face);
1525 } 1527 }
1526 1528
1527 FT_Done_Face(face); 1529 FT_Done_Face(face);
1528 FT_Done_FreeType(library); 1530 FT_Done_FreeType(library);
1529 return true; 1531 return true;
1530 } 1532 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698