Changeset 49937 in webkit


Ignore:
Timestamp:
Oct 22, 2009 4:52:52 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-22 Maxime Simon <Maxime Simon>

Reviewed by Holger Freyther.

[Haiku] Correction of the accented letter width (they were 2 characters long).
https://bugs.webkit.org/show_bug.cgi?id=30629

  • platform/graphics/haiku/SimpleFontDataHaiku.cpp: (WebCore::SimpleFontData::platformWidthForGlyph):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49933 r49937  
     12009-10-22  Maxime Simon  <simon.maxime@gmail.com>
     2
     3        Reviewed by Holger Freyther.
     4
     5        [Haiku] Correction of the accented letter width (they were 2 characters long).
     6        https://bugs.webkit.org/show_bug.cgi?id=30629
     7
     8        * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
     9        (WebCore::SimpleFontData::platformWidthForGlyph):
     10
    1112009-10-21  Jon Honeycutt  <jhoneycutt@apple.com>
    212
  • trunk/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp

    r47637 r49937  
    3939#include <unicode/unorm.h>
    4040
     41
     42extern int charUnicodeToUTF8HACK(unsigned short, char*);
    4143
    4244namespace WebCore {
     
    9496float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
    9597{
    96     const char charArray[1] = { glyph };
     98    if (!m_platformData.font())
     99        return 0;
     100
     101    char charArray[4];
    97102    float escapements[1];
    98103
    99     if (m_platformData.font()) {
    100         m_platformData.font()->GetEscapements(charArray, 1, escapements);
    101         return escapements[0] * m_platformData.font()->Size();
    102     }
    103 
    104     return 0;
     104    charUnicodeToUTF8HACK(glyph, charArray);
     105    m_platformData.font()->GetEscapements(charArray, 1, escapements);
     106    return escapements[0] * m_platformData.font()->Size();
    105107}
    106108
Note: See TracChangeset for help on using the changeset viewer.