equal
deleted
inserted
replaced
25 #include "PlatformFontCache.h" |
25 #include "PlatformFontCache.h" |
26 #include <wtf/MathExtras.h> |
26 #include <wtf/MathExtras.h> |
27 #include <e32base.h> |
27 #include <e32base.h> |
28 #include <e32std.h> |
28 #include <e32std.h> |
29 #include <fbs.h> |
29 #include <fbs.h> |
|
30 #include <e32const.h> |
30 |
31 |
31 // CONSTATNS |
32 // CONSTATNS |
32 _LIT(KX,"x"); |
33 _LIT(KX,"x"); |
33 _LIT(KSpace, " "); |
34 _LIT(KSpace, " "); |
34 |
35 |
38 { |
39 { |
39 |
40 |
40 void FontData::platformInit() |
41 void FontData::platformInit() |
41 { |
42 { |
42 const CFont& font( m_font ); |
43 const CFont& font( m_font ); |
43 m_ascent = font.AscentInPixels() + 2; |
44 TLanguage language = User::Language(); |
44 m_descent = font.DescentInPixels() - 2; |
45 if (language == ELangPrcChinese ) { |
|
46 m_ascent = font.AscentInPixels(); |
|
47 m_descent = font.DescentInPixels(); |
|
48 } else { |
|
49 m_ascent = font.AscentInPixels() + 2; |
|
50 m_descent = font.DescentInPixels() - 2; |
|
51 } |
45 m_lineGap = font.FontLineGap(); |
52 m_lineGap = font.FontLineGap(); |
46 m_lineSpacing = m_ascent + m_descent + 1; |
53 m_lineSpacing = m_ascent + m_descent + 1; |
47 |
54 |
48 CFont::TMeasureTextOutput output; |
55 CFont::TMeasureTextOutput output; |
49 font.MeasureText( TPtrC(KX), 0, &output ); |
56 font.MeasureText( TPtrC(KX), 0, &output ); |