Questions tagged «typeface»

30
如何在Android中更改TextView的fontFamily
因此,我想android:fontFamily在Android中进行更改,但在Android中看不到任何预定义的字体。如何选择一种预定义的?我真的不需要定义自己的TypeFace,但我所需要的只是与现在显示的有所不同。 <TextView android:id="@+id/HeaderText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="52dp" android:gravity="center" android:text="CallerBlocker" android:textSize="40dp" android:fontFamily="Arial" /> 看来我在那里所做的并没有真正的作用!BTW android:fontFamily="Arial"是一个愚蠢的尝试!


6
Java代码中的“ android:fontFamily =” sans-serif-light”等效项是什么?
我的问题很简单: 在我的每个textview中,我当前正在使用该属性 android:fontFamily="sans-serif-light" 为后置HC设备提供漂亮的外观。 不幸的是,这不适用于每个小部件,对于Spinners,我需要覆盖Adapter。 @Override public View getView(int position, View convertView, ViewGroup parent) { //You can use the new tf here. if(convertView == null || convertView.getTag() == null) { // new view - populate convertView = inflater.inflate(android.R.layout.simple_spinner_dropdown_item, parent, false); convertView.setTag(new Object()); } CheckedTextView spinner_text=(CheckedTextView) convertView.findViewById(android.R.id.text1); //Typeface should be set …
106 android  typeface 

7
视觉上的iOS字体列表?
我正在寻找iOS 7的iOS字体列表。我在Apple的开发人员网站上找到了该列表,我想知道是否有人知道一个视觉列表,其中每个字体名称都以其字体键入。我以前看过一两本书,但是我看过的最新一本书是针对iOS 5的,此后又增加了更多。
102 ios  uifont  typeface 


15
仅某些人可以“制作本机字体”
我有一个可更改某些元素字体字体的应用程序。它对大多数人来说效果很好,但是尝试更改字体时可能会有0.5%的异常。堆栈跟踪的重要部分是: Caused by: java.lang.RuntimeException: native typeface cannot be made at android.graphics.Typeface.<init>(Typeface.java:147) at android.graphics.Typeface.createFromAsset(Typeface.java:121) 正如我所说,它对大多数人都有效,所以我认为这与字体文件或代码无关。关于如何解决这个问题的任何建议? 编辑:这是我的代码: Typeface phoneticFont = Typeface.createFromAsset(getAssets(), "fonts/CharisSILR.ttf"); TextView tv; tv = ((TextView) findViewById(R.id.searchPronunciationTitle)); tv.setTypeface(phoneticFont);
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.