2014-10-20 110 views
0

我在我的項目中使用arial.ttf。在genymotion模擬器中,在一些移動設備中,我的文本視圖看起來不錯。但在索尼Xperia平板電腦4.1.1我有文字渲染問題。文字看起來很糟糕。我該怎麼辦?Android的字體渲染,我越來越壞視圖

<TextView 
    android:id="@+id/yazi1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/Ret" 
    android:textColor="@color/siyah" 
    android:textColorHint="@color/siyah" 
    android:textSize="@dimen/font14" /> 

Typeface tfArial = Typeface.createFromAsset(getAssets(), "arial_tur2.ttf") 

截圖http://hizliresim.com/ynJjWk

回答

0

使用OTF而不是TTF。這可能是你的問題。我在這種情況下,用OTF更改文件解決了我的問題。

OTF更可能是一個「更好」的字體,因爲它支持更高級的排版功能(小字體,替代字體,連字等實際上在字體內部,而不是在獨立的專業字體集合中)。它也可以包含樣條(TTF樣式)或Bezier(PostScript Type 1樣式)曲線,所以希望您可以獲得字體最初設計的形狀,而不是潛在的質量較差的轉換。

另一方面,如果你從shovelware網站下載免費字體,你不可能得到任何。事實上,您可能很簡單地將TTF字體重命名爲OTF。

+0

謝謝蘇哈爾。沒關係。 – 2014-10-20 08:21:54