我发现网易新闻、今日头条的字体都偏细,偏扁,不同于默认的系统字体,反编译却没有发现字体文件,也没有发现自定义字体的地方,而且我更换系统字体后,他们也能自动采用新的系统字体。
PHPz2017-04-17 13:41:13
In API 16, a fontFamily attribute is provided for modifying the font. The name can be obtained from %android-sdk%platformsandroid-16+datafontssystem_fonts.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
android:typeface="normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-thin"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed-light"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-monospace"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="courier new"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-smallcaps"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="cursive"
android:text="@string/hello_world" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="casual"
android:text="@string/hello_world" />
</LinearLayout>
The news page of NetEase News uses WebView
PHPz2017-04-17 13:41:13
Some of their fonts are customized with money and are not available in the font library
ringa_lee2017-04-17 13:41:13
This is NetEase News. You can see that his characters are relatively flat and thin.
Look at our application again. We don’t have fontFamily and typeface set. It’s quite rough