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

Side by Side Diff: source/test/letest/SimpleFontInstance.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « source/test/letest/Makefile.in ('k') | source/test/letest/cfonts.h » ('j') | 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 * 3 *
4 * Copyright (C) 1999-2013, International Business Machines 4 * Copyright (C) 1999-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 * file name: SimpleFontInstance.cpp 8 * file name: SimpleFontInstance.cpp
9 * 9 *
10 * created on: 03/30/2006 10 * created on: 03/30/2006
11 * created by: Eric R. Mader 11 * created by: Eric R. Mader
12 */ 12 */
13 13
14 #include "unicode/utypes.h" 14 #include "unicode/utypes.h"
15 #include "unicode/uchar.h" 15 #include "unicode/uchar.h"
16 16
17 #include "layout/LETypes.h" 17 #include "layout/LETypes.h"
18 #include "layout/LEFontInstance.h" 18 #include "layout/LEFontInstance.h"
19 19
20 #ifndef USING_ICULEHB
20 #include "CanonShaping.h" 21 #include "CanonShaping.h"
22 #endif
23
21 #include "SimpleFontInstance.h" 24 #include "SimpleFontInstance.h"
22 25
23 SimpleFontInstance::SimpleFontInstance(float pointSize, LEErrorCode &status) 26 SimpleFontInstance::SimpleFontInstance(float pointSize, LEErrorCode &status)
24 : fPointSize(pointSize), fAscent(0), fDescent(0) 27 : fPointSize(pointSize), fAscent(0), fDescent(0)
25 { 28 {
26 if (LE_FAILURE(status)) { 29 if (LE_FAILURE(status)) {
27 return; 30 return;
28 } 31 }
29 32
30 fAscent = (le_int32) yUnitsToPoints(2000.0); 33 fAscent = (le_int32) yUnitsToPoints(2000.0);
31 fDescent = (le_int32) yUnitsToPoints(600.0); 34 fDescent = (le_int32) yUnitsToPoints(600.0);
32 35
33 return; 36 return;
34 } 37 }
35 38
36 SimpleFontInstance::~SimpleFontInstance() 39 SimpleFontInstance::~SimpleFontInstance()
37 { 40 {
38 // nothing to do... 41 // nothing to do...
39 } 42 }
40 43
41 const void *SimpleFontInstance::getFontTable(LETag tableTag) const 44 const void *SimpleFontInstance::getFontTable(LETag tableTag) const
42 { 45 {
46 #ifndef USING_ICULEHB
43 if (tableTag == LE_GSUB_TABLE_TAG) { 47 if (tableTag == LE_GSUB_TABLE_TAG) {
44 return CanonShaping::glyphSubstitutionTable; 48 return CanonShaping::glyphSubstitutionTable;
45 } 49 }
46 50
47 if (tableTag == LE_GDEF_TABLE_TAG) { 51 if (tableTag == LE_GDEF_TABLE_TAG) {
48 return CanonShaping::glyphDefinitionTable; 52 return CanonShaping::glyphDefinitionTable;
49 } 53 }
50 54 #endif
51 return NULL; 55 return NULL;
52 } 56 }
53 57
54 void SimpleFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) cons t 58 void SimpleFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) cons t
55 { 59 {
56 #if 0 60 #if 0
57 if (u_getCombiningClass((UChar32) glyph) == 0) { 61 if (u_getCombiningClass((UChar32) glyph) == 0) {
58 advance.fX = xUnitsToPoints(2048); 62 advance.fX = xUnitsToPoints(2048);
59 } else { 63 } else {
60 advance.fX = 0; 64 advance.fX = 0;
61 } 65 }
62 #else 66 #else
67 (void)glyph; // Suppress unused parameter compiler warning.
63 advance.fX = xUnitsToPoints(2048); 68 advance.fX = xUnitsToPoints(2048);
64 #endif 69 #endif
65 70
66 advance.fY = 0; 71 advance.fY = 0;
67 } 72 }
68 73
69 le_int32 SimpleFontInstance::getUnitsPerEM() const 74 le_int32 SimpleFontInstance::getUnitsPerEM() const
70 { 75 {
71 return 2048; 76 return 2048;
72 } 77 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 float SimpleFontInstance::getScaleFactorY() const 128 float SimpleFontInstance::getScaleFactorY() const
124 { 129 {
125 return 1.0; 130 return 1.0;
126 } 131 }
127 132
128 le_bool SimpleFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointN umber*/, LEPoint &/*point*/) const 133 le_bool SimpleFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointN umber*/, LEPoint &/*point*/) const
129 { 134 {
130 return FALSE; 135 return FALSE;
131 } 136 }
132 137
OLDNEW
« no previous file with comments | « source/test/letest/Makefile.in ('k') | source/test/letest/cfonts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698