webengine/osswebengine/WebCore/platform/symbian/FontDataSymbian.cpp
branchRCL_3
changeset 48 79859ed3eea9
parent 46 30342f40acbf
child 49 919f36ff910f
equal deleted inserted replaced
47:e1bea15f9a39 48:79859ed3eea9
    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>
       
    31 
    30 
    32 // CONSTATNS
    31 // CONSTATNS
    33 _LIT(KX,"x");
    32 _LIT(KX,"x");
    34 _LIT(KSpace, " ");
    33 _LIT(KSpace, " ");
    35 
    34 
    39 {
    38 {
    40 
    39 
    41 void FontData::platformInit()
    40 void FontData::platformInit()
    42 {
    41 {
    43     const CFont& font( m_font );
    42     const CFont& font( m_font );
    44     TLanguage language = User::Language();
    43     m_ascent = font.AscentInPixels() + 2;
    45     if (language == ELangTaiwanChinese || language == ELangHongKongChinese || language == ELangPrcChinese || 
    44     m_descent = font.DescentInPixels() - 2;
    46         language == ELangEnglish_Taiwan || language == ELangEnglish_HongKong || language == ELangEnglish_Prc) {
       
    47         m_ascent = font.AscentInPixels();
       
    48         m_descent = font.DescentInPixels();
       
    49     } else {
       
    50         m_ascent = font.AscentInPixels() + 2;
       
    51         m_descent = font.DescentInPixels() - 2;
       
    52     }
       
    53     m_lineGap = font.FontLineGap();
    45     m_lineGap = font.FontLineGap();
    54     m_lineSpacing = m_ascent + m_descent + 1;
    46     m_lineSpacing = m_ascent + m_descent + 1;
    55 
    47 
    56     CFont::TMeasureTextOutput output;
    48     CFont::TMeasureTextOutput output;
    57     font.MeasureText( TPtrC(KX), 0, &output );
    49     font.MeasureText( TPtrC(KX), 0, &output );