hironishihara / ofxTrueTypeFontUC

An extension of ofTrueTypeFont class for using UNICODE characters. Tested on OSX, iOS, and Windows.
Other
115 stars 46 forks source link

convert function convToUCS4 called twice. #2

Closed Takahiro-Nagai closed 11 years ago

Takahiro-Nagai commented 11 years ago

はじめまして。

Mac OS X 10.7.5 で利用していますが、 stringWidth(wstring s)メンバ関数 の結果がどうもおかしいので、調べた所、 当方の環境ではllvmマクロとclangマクロが定義されているのですが、 stringWidth(wstring s)メンバ関数 ofxTrueTypeFontUC.cpp 575行目で 一度 util::ofxTrueTypeFontUC::convToUCS4 で変換され、 その後getStringBoundingBox内で再度全く同じように変換されていることが原因のようですので 報告します。

stringWidth(wstring s)メンバ関数のほうの変換をコメントアウトしたところ問題なくなりました。

環境依存の問題で上手く再現しないかもしれませんがよろしくお願いします。

hironishihara commented 11 years ago

ご報告ありがとうございます。 stringWidth()とstringHeight()について修正を行ないました。

もしよろしければ、XcodeのVersionとApple LLVM compilerのVersionを教えてください。

Takahiro-Nagai commented 11 years ago

ありがとうございます。

Xcodeは4.3.3、LLVM compilerは3.1です。