2017-05-19, 10:47
Seen a lot of requests for new fonts for Kodi's core and its skins so suggest that you create a new binary addon type for Fonts and made them downloadable / upgradable from Team-Kodi's official repository, just like any other add-ons for Kodi.
Reason for Fonts as resource addons probably being a good idea is that it might make Kodi's core and skin installation packages smaller and adds the possibility to update or add a new fonts and languages in-between major releases.
This way any font addon can be installed on-demand when you change language in Kodi or install a new skin that request a other font as a dependency. And multiple skins/addons can share the same font files.
I'm sure this idea is not new but I just now read about the same concept being implemented in Android “O” new Features and APIs list so simply stole that idea from there:
https://developer.android.com/preview/api-overview.html
"Android O and Android Support Library 26 let you request fonts from a provider application instead of bundling fonts into the APK or letting the APK download fonts. This feature reduces your APK size, increases the app installation success rate, and allows multiple apps to share the same font.
For more information about downloading fonts, refer to Downloadable Fonts."
https://developer.android.com/preview/fe...fonts.html
Fonts in XML
Android O introduces a new feature, Fonts in XML, which lets you use fonts as resources. This means, there is no need to bundle fonts as assets. Fonts are compiled in R file and are automatically available in the system as a resource. You can then access these fonts with the help of a new resource type, font.
The Support Library 26 provides full support to this feature on devices running API versions 14 and higher.
For more information, about using fonts as resources and retrieving system fonts, see Fonts in XML.
https://developer.android.com/preview/fe...n-xml.html
Reason for Fonts as resource addons probably being a good idea is that it might make Kodi's core and skin installation packages smaller and adds the possibility to update or add a new fonts and languages in-between major releases.
This way any font addon can be installed on-demand when you change language in Kodi or install a new skin that request a other font as a dependency. And multiple skins/addons can share the same font files.
I'm sure this idea is not new but I just now read about the same concept being implemented in Android “O” new Features and APIs list so simply stole that idea from there:
https://developer.android.com/preview/api-overview.html
"Android O and Android Support Library 26 let you request fonts from a provider application instead of bundling fonts into the APK or letting the APK download fonts. This feature reduces your APK size, increases the app installation success rate, and allows multiple apps to share the same font.
For more information about downloading fonts, refer to Downloadable Fonts."
https://developer.android.com/preview/fe...fonts.html
Fonts in XML
Android O introduces a new feature, Fonts in XML, which lets you use fonts as resources. This means, there is no need to bundle fonts as assets. Fonts are compiled in R file and are automatically available in the system as a resource. You can then access these fonts with the help of a new resource type, font.
The Support Library 26 provides full support to this feature on devices running API versions 14 and higher.
For more information, about using fonts as resources and retrieving system fonts, see Fonts in XML.
https://developer.android.com/preview/fe...n-xml.html