[Webkit-unassigned] [Bug 27734] WINCE PORT: font related changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 7 13:41:39 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27734


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34297|review?                     |review-
               Flag|                            |




--- Comment #21 from Eric Seidel <eric at webkit.org>  2009-08-07 13:41:38 PDT ---
(From update of attachment 34297)
What does this mean?
STORE_FONT_CUSTOM_PLATFORM_DATA

Not sufficient explanation:
 74 // Need to use #define instead of typedef due to conflict

Not a valid variable name:
 353     const sfntHeader* sfnt = reinterpret_cast<const
sfntHeader*>(fontData->data());

Seems like this shoudl be a static inline function:
69     size_t nameTableSize = ((offsetof(nameTable, nameRecords) +
nameRecordCount * sizeof(nameRecord) + fontName.length() * sizeof(UChar)) & ~3)
+ 4;

This function needs more commentary:
 347 bool renameFont(SharedBuffer* fontData, const String& fontName)

What is it trying to do?  re-write the in-memory font representation?

Put this in a separate static inline, please:
380     // Write the new 'name' table after the original font data.
 381     nameTable* name = reinterpret_cast<nameTable*>(data +
originalDataSize);
 382     name->format = 0;
 383     name->count = nameRecordCount;
 384     name->stringOffset = offsetof(nameTable, nameRecords) +
nameRecordCount * sizeof(nameRecord);
 385     for (unsigned i = 0; i < nameRecordCount; ++i) {
 386         name->nameRecords[i].platformID = 3;
 387         name->nameRecords[i].encodingID = 1;
 388         name->nameRecords[i].languageID = 0x0409;
 389         name->nameRecords[i].offset = 0;
 390         name->nameRecords[i].length = fontName.length() * sizeof(UChar);
 391     }
 392 

This code is not legible.  Please make it more understandable to casual
readers.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list