[Webkit-unassigned] [Bug 81326] Vertical flow support for OpenType fonts with the least platform dependencies

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 18 00:50:59 PDT 2012


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





--- Comment #7 from Koji Ishii <kojiishi at gmail.com>  2012-03-18 00:50:59 PST ---
(In reply to comment #5)
> > Source/WebCore/platform/graphics/opentype/OpenTypeTypes.h:59
> > +#define OT_MAKE_TAG(ch1, ch2, ch3, ch4) ((((uint32_t)(ch4)) << 24) | (((uint32_t)(ch3)) << 16) | (((uint32_t)(ch2)) << 8) | ((uint32_t)(ch1)))
> 
> Is this necessary? OpenTypeUtilities.cpp makes us think that all relevant compilers support four-character literals.

I remember this one; I did this because Win32 GetFontData API expects different order from four-character literals, and as you said OpenTypeUtilities and several CG code use the syntax but they're not adopted to many platforms in WebKit as far as I understand. Chrome for instance excludes OpenTypeUtilities, my understanding is -- correct me if I'm wrong -- only CGWin and WinCE use OpenTypeUtilities.

I googled and got an article saying that this is implementation-defined in C99:
http://stackoverflow.com/questions/3960954/c-multicharacter-literal
but the article also says it's used in several libraries including boost. Other articles mention the same for C++0x.

I personally prefer the safe way if the spec says it's undefined, but bootst using it seems to be it's pretty safe, so I'd like to follow what you'd say. I can put conversion before calling Win32 API if necessary.

Can you tell me which you prefer?

-- 
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