{"action":"created","issue":{"url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/202","labels_url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/202/comments","events_url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/202/events","html_url":"https://github.com/chrisjenx/Calligraphy/issues/202","id":102889959,"number":202,"title":"Design Support Library support?","user":{"login":"nealsanche","id":5369033,"avatar_url":"https://avatars.githubusercontent.com/u/5369033?v=3","gravatar_id":"","url":"https://api.github.com/users/nealsanche","html_url":"https://github.com/nealsanche","followers_url":"https://api.github.com/users/nealsanche/followers","following_url":"https://api.github.com/users/nealsanche/following{/other_user}","gists_url":"https://api.github.com/users/nealsanche/gists{/gist_id}","starred_url":"https://api.github.com/users/nealsanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealsanche/subscriptions","organizations_url":"https://api.github.com/users/nealsanche/orgs","repos_url":"https://api.github.com/users/nealsanche/repos","events_url":"https://api.github.com/users/nealsanche/events{/privacy}","received_events_url":"https://api.github.com/users/nealsanche/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-24T20:57:21Z","updated_at":"2015-09-21T22:32:17Z","closed_at":null,"body":"I've noticed the fonts in the CollapsingToolbarLayout in particular, the Title attribute, isn't set. I've had to resort to something ugly like the following to get it to set the font on it:\r\n\r\n```\r\n\r\npublic static void modifyCollapsingToolbarTextFont(Context context, CollapsingToolbarLayout collapsingToolbar) {\r\n        // Hack so that the typeface is correct for the title and the title is centered\r\n        try {\r\n            // Get the mCollapsingTextHelper instance\r\n            Field declaredField = collapsingToolbar.getClass().getDeclaredField(\"mCollapsingTextHelper\");\r\n            declaredField.setAccessible(true);\r\n            Object collapsingTextHelper = declaredField.get(collapsingToolbar);\r\n\r\n            // The get its mTextPaint field\r\n            Field paintField = collapsingTextHelper.getClass().getDeclaredField(\"mTextPaint\");\r\n            paintField.setAccessible(true);\r\n            TextPaint textPaint = (TextPaint) paintField.get(collapsingTextHelper);\r\n\r\n            final Typeface tf = Typeface.createFromAsset(context.getAssets(), \"fonts/FrutigerLTStd-Light.otf\");\r\n            textPaint.setTypeface(tf);\r\n\r\n        } catch (Exception e) {\r\n            Timber.e(e, \"Unexpected error.\");\r\n        }\r\n    }\r\n\r\n```\r\n\r\nI'd much rather have Calligraphy handle this for me in a nice, unseen, magical way as per usual. I was hoping that the following would just work:\r\n\r\n```\r\n\r\n    <style name=\"TextAppearance.Hero.Title\" parent=\"TextAppearance.AppCompat.Title\">\r\n        <item name=\"fontPath\">fonts/FrutigerLTStd_Light.ttf</item>\r\n        <item name=\"android:textColor\">@color/cpb_text_color_error</item>\r\n        <item name=\"android:textSize\">@dimen/hero_font_size</item>\r\n        <item name=\"android:textStyle\">normal</item>\r\n    </style>\r\n\r\n```\r\n\r\nAnd then in the layout:\r\n\r\n```\r\n            <android.support.design.widget.CollapsingToolbarLayout\r\n                android:id=\"@+id/collapsing_toolbar\"\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"match_parent\"\r\n                android:fitsSystemWindows=\"true\"\r\n                app:title=\"Title\"\r\n                app:titleEnabled=\"true\"\r\n                app:contentScrim=\"@android:color/transparent\"\r\n                app:expandedTitleMarginBottom=\"85dp\"\r\n                app:expandedTitleGravity=\"center\"\r\n                app:expandedTitleTextAppearance=\"@style/TextAppearance.Hero.Title\"\r\n                app:layout_scrollFlags=\"scroll|exitUntilCollapsed\"\r\n                app:statusBarScrim=\"@android:color/transparent\">\r\n\r\n```\r\n\r\nBut, sadly, it doesn't set the font.\r\n"},"comment":{"url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/comments/142128008","html_url":"https://github.com/chrisjenx/Calligraphy/issues/202#issuecomment-142128008","issue_url":"https://api.github.com/repos/chrisjenx/Calligraphy/issues/202","id":142128008,"user":{"login":"chrisjenx","id":1167793,"avatar_url":"https://avatars.githubusercontent.com/u/1167793?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisjenx","html_url":"https://github.com/chrisjenx","followers_url":"https://api.github.com/users/chrisjenx/followers","following_url":"https://api.github.com/users/chrisjenx/following{/other_user}","gists_url":"https://api.github.com/users/chrisjenx/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisjenx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisjenx/subscriptions","organizations_url":"https://api.github.com/users/chrisjenx/orgs","repos_url":"https://api.github.com/users/chrisjenx/repos","events_url":"https://api.github.com/users/chrisjenx/events{/privacy}","received_events_url":"https://api.github.com/users/chrisjenx/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T22:32:17Z","updated_at":"2015-09-21T22:32:17Z","body":"So looks like `setTypeface` is enabled on the latest version of the design lib. This would still require a nasty work around tho to extract the correct Style for it. Although I could at the very least support the Default/Theme typeface."}}