{"action":"created","issue":{"url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/6","labels_url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/6/comments","events_url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/6/events","html_url":"https://github.com/Innovattic/Android-Font-Integration/issues/6","id":62365108,"number":6,"title":"TypefaceManager and Lollipop","user":{"login":"Narayane","id":4921308,"avatar_url":"https://avatars.githubusercontent.com/u/4921308?v=3","gravatar_id":"","url":"https://api.github.com/users/Narayane","html_url":"https://github.com/Narayane","followers_url":"https://api.github.com/users/Narayane/followers","following_url":"https://api.github.com/users/Narayane/following{/other_user}","gists_url":"https://api.github.com/users/Narayane/gists{/gist_id}","starred_url":"https://api.github.com/users/Narayane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narayane/subscriptions","organizations_url":"https://api.github.com/users/Narayane/orgs","repos_url":"https://api.github.com/users/Narayane/repos","events_url":"https://api.github.com/users/Narayane/events{/privacy}","received_events_url":"https://api.github.com/users/Narayane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T11:05:05Z","updated_at":"2015-03-18T22:52:53Z","closed_at":null,"body":"Hi,\r\n\r\nI use your TypefaceManager in my app which is compatible with API 8 and higher.\r\n\r\nI have this fonts declaration : \r\n< familyset>\r\n    < family>\r\n        < nameset>\r\n            < name>univers_45_light< /name>\r\n        < /nameset>\r\n        < fileset>\r\n            < file>univers_45_light.ttf< /file>\r\n            < file>univers_45_light_bold.ttf< /file>\r\n        < /fileset>\r\n    < /family>\r\n    < family>\r\n        < nameset>\r\n            < name>univers_55_roman< /name>\r\n        < /nameset>\r\n        < fileset>\r\n            < file>univers_55_roman.ttf< /file>\r\n        < /fileset>\r\n    < /family>\r\n< /familyset>\r\n\r\nEverything works fine on API 19 and below for both but on Lollipop, univers_55_roman is never displayed while univers_45_light is.\r\nHowever, TypefaceManager seems to do right its job whatever api level is used.\r\n\r\n03-17 11:53:36.841: I/TypefaceManager(17738): Inflating font univers_55_roman (style 0) with file univers_55_roman.ttf\r\n03-17 11:53:45.114: I/TypefaceManager(17738): Inflating font univers_45_light (style 0) with file univers_45_light.ttf\r\n03-17 11:53:46.252: I/TypefaceManager(17738): Inflating font univers_45_light (style 1) with file univers_45_light_bold.ttf\r\n\r\nHave you ever had this kind of problem on Lollipop ? Maybe is not a TypefaceManager's problem, I am puzzled by the fact one font works and not the other on Lollipop.\r\n\r\nCan you help me ?\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/comments/83217286","html_url":"https://github.com/Innovattic/Android-Font-Integration/issues/6#issuecomment-83217286","issue_url":"https://api.github.com/repos/Innovattic/Android-Font-Integration/issues/6","id":83217286,"user":{"login":"jfresen","id":445369,"avatar_url":"https://avatars.githubusercontent.com/u/445369?v=3","gravatar_id":"","url":"https://api.github.com/users/jfresen","html_url":"https://github.com/jfresen","followers_url":"https://api.github.com/users/jfresen/followers","following_url":"https://api.github.com/users/jfresen/following{/other_user}","gists_url":"https://api.github.com/users/jfresen/gists{/gist_id}","starred_url":"https://api.github.com/users/jfresen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfresen/subscriptions","organizations_url":"https://api.github.com/users/jfresen/orgs","repos_url":"https://api.github.com/users/jfresen/repos","events_url":"https://api.github.com/users/jfresen/events{/privacy}","received_events_url":"https://api.github.com/users/jfresen/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T22:52:53Z","updated_at":"2015-03-18T22:52:53Z","body":"Hi,\r\nWhat do you mean by saying the font is never displayed? Do you see the TextView, but it is completely empty despite the fact that you defined a text in there, or is the text displayed correctly, but in the default Android font?\r\nMy best guess is there is something about the font file that Android does not understand or like. Try setting the font in a TextView in a bare project using the same build tools and sdk versions as your project. Does it show the font then?\r\nYou can set the Typeface manually like this:\r\n\r\n```java\r\npublic class MainActivity extends Activity {\r\n\r\n    private TextView mGnuTypewriter;\r\n    private TextView mXoloniumRegu;\r\n    private TextView mXoloniumBold;\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_main);\r\n\r\n        mGnuTypewriter = (TextView) findViewById(R.id.gnu_typewriter);\r\n        mXoloniumRegu = (TextView) findViewById(R.id.xolonium_regular);\r\n        mXoloniumBold = (TextView) findViewById(R.id.xolonium_bold);\r\n\r\n        final Typeface fGnuTypewriter = Typeface.createFromAsset(getAssets(), \"fonts/gtw.ttf\");\r\n        final Typeface fXoloniumRegu = Typeface.createFromAsset(getAssets(), \"fonts/Xolonium-Regular.ttf\");\r\n        final Typeface fXoloniumBold = Typeface.createFromAsset(getAssets(), \"fonts/Xolonium-Bold.ttf\");\r\n\r\n        mGnuTypewriter.setTypeface(fGnuTypewriter);\r\n        mXoloniumRegu.setTypeface(fXoloniumRegu);\r\n        mXoloniumBold.setTypeface(fXoloniumBold);\r\n    }\r\n\r\n}\r\n```"}}