Obsolete
Status Update
Comments
re...@google.com <re...@google.com> #2
This is caused by a typo. I am testing a patch.
mo...@gmail.com <mo...@gmail.com> #3
si...@gmail.com <si...@gmail.com> #4
fix submitted to aosp servers.
ha...@gmail.com <ha...@gmail.com> #5
Available in NDK r8
mi...@gmail.com <mi...@gmail.com> #6
Help me fix issue
bo...@gmail.com <bo...@gmail.com> #7
gabi++/stlport no longer exist in the NDK.
so...@gmail.com <so...@gmail.com> #8
Here I apply this feature. But my ADT Bundle does not support typeface as a resource. What can i Do
mi...@gmail.com <mi...@gmail.com> #9
use Calligraphy for Android
sh...@gmail.com <sh...@gmail.com> #10
This is a very basic feature that Android should implement out of the box, without we having a need to have something like Calligraphy.
Although Calligraphy fills the void, but it would be great if Android had native support for this.
Although Calligraphy fills the void, but it would be great if Android had native support for this.
bo...@gmail.com <bo...@gmail.com> #11
Indeed Calligraphy is very useful but let's face it, it's a hack (no disrespect to its developers). Such a basic and obvious feature should absolutely be part of the SDK.
ma...@gmail.com <ma...@gmail.com> #12
The option to add custom typefaces should be included in the SDK
cr...@gmail.com <cr...@gmail.com> #13
waiting for this feature...
ol...@gmail.com <ol...@gmail.com> #14
So much waiting for this feature !
am...@gmail.com <am...@gmail.com> #15
there is a library to do this
https://github.com/chrisjenx/Calligraphy
fontPath="fonts/Roboto-Bold.ttf"
fontPath="fonts/Roboto-Bold.ttf"
bo...@gmail.com <bo...@gmail.com> #16
#17: please see comment #13
am...@gmail.com <am...@gmail.com> #17
i agree it's should be in the sdk so it could handle device font change.
en...@google.com <en...@google.com>
bo...@gmail.com <bo...@gmail.com> #18
Since this issue has just been marked as "Obsolete" for no apparent reason (thanks a lot for wasting everybody's time), I have created a new issue for this request: https://code.google.com/p/android/issues/detail?id=88945
sh...@gmail.com <sh...@gmail.com> #19
Obsolete, means this really important and seemingly easy fix (since other libraries like Calligraphy are doing it) won't ever make it to the TextView?
Just starred the new issue just created
Just starred the new issue just created
da...@gmail.com <da...@gmail.com> #20
"(No comment was entered for this change.)" Very pro, guys.
ta...@gmail.com <ta...@gmail.com> #21
Just starred the new issue. Thats really cumbersome.
jo...@flipagram.com <jo...@flipagram.com> #22
No fonts for you -- Merry Christmas!
Description
the default typeface) via XML. This is problematic for user interfaces that
require a consistent non-standard typeface across many activities. Possible
solutions include:
1) Creating an extension of TextView that sets the typeface, and
referencing that in the API (this needs to be done for extensions of
TextView too such as Button).
2) Assigning every TextView an id, and then in onCreate finding each View explicitly and setting the typeface (a time consuming and error prone
approach for large applications).
3) Walking the View hierarchy and setting the typeface on every TextView
(extremely inefficient).
Note that all three approaches have the added complication that the
application developer needs to address the styling of typeface too.
In my opinion, none of these solutions really address the problem
adequately.
I haven't taken the time to produce a full proposal on how I would like to
see this addressed, but my inclination is to treat typefaces as resources:
TTF files could be placed in a "typeface" resource directory and subjected
to the usual configuration selection process. This could be useful if the
developer needed to fallback to a default typeface for a locale that was
unsupported by a particular typeface, or say if a different typeface
provided better clarity for smaller screens.
The typeface could be specified using an XML attribute, a typeface in the
file res/typeface/myfont.ttf would be assigned using:
<TextView
...
android:textTypeface="@typeface/myfont"
/>
Furthermore, since bold, regular and italic typefaces are packaged as
separate TTF files, it would be necessary to have a "typeface selector"
resource type that could choose a typeface based on the style. Informally,
something like:
<selector>
<item android:bold="true" android:typeface="@typeface/myfontb"/>
<item android:italic="true" android:typeface="@typeface/myfonti"/>
<item android:bold="true" android:italic="true"
android:typeface="@typeface/myfontbi"/>
<item android:typeface="@typeface/myfont"/>
</selector>
The capability to specify algorithmically generated italics and bold might
also be useful (say via new boolean attributes on typeface items called
android:embolden and android:italicize).