what is the difference between "Create downloadable font" and "Add font to project"?
what is the best way?
"Create downloadable font" refers to creating a font that can be downloaded and installed on the device at runtime. This allows the font to be dynamically loaded by the application and provides a flexible way to change the font without requiring an update to the app.
"Add font to project" refers to adding the font directly to the project resources, which will be packaged with the app when it is built. This makes the font available to the application at all times and is a simpler solution for small projects or for cases where the font will not change.
The choice between the two methods depends on the requirements of the project, including the size of the font file, the need for dynamic updates, and the requirement to install the font on the device.
Related
I should study some apps of different kinds for homework, also want to determine what kind of font are in use.
I try to open the different apk but don't know where to find the setting about the font (or font-family).
Can't use online imagine font detector, because are imprecise.
You could reverse engineer it, which sounds harder than it is for this purpose.
Get a tool like Apktool (https://ibotpeaches.github.io/Apktool/) and decompile the APK.
If all goes well, you find a folder called res/font, which should have the folders for each font used inside of it.
From the app itself it is not possible to find the font used (unless it is a text processing app where you can select the font yourself..)
Is there any fontconfig-like way to search system font files on Android?
My game UI library provides a ttf font rendering. Someone just specify at least "human-readable" name, italic flag and font weight. The only way I found is just hardcode paths to system fonts in code, but it does not reliable and can't consider weight and italic parameters.
Maybe there is a file, which I can parse and get system font names from it?
On Linux I use fontconfig, I can use it on Android too, but I don't want to have completely useless megabytes in APK.
You can now query Google Fonts API, with the latest Support Library. It's not exactly what you're looking for, but maybe you'd like to consider this approach.
I created a livecode project. I designed my UI by changing colors and fonts.
After creating that app, I deploy it to an android installer file (.apk file). When I launch the application to my android device, the UI from android device is not exactly the same as in the livecode. The text from the labels and buttons are getting too close which is annoying.
If you're not including a font in your APK file, chances are that Android chooses a font different from the font chosen by iOS. Either set the textFont of the field to a font that is available on both platforms or include your own font. If you include a font with the standalone and make sure that it is located next to the engine file, the font will be available. You can check that a font is available by using the fontNames:
put ("Font Name" is among the lines of the fontNames) into myFontAvailable
The default textFont of a field is empty, which means that it is inherited from the stack. If the textFont of a stack is empty, the system font is used. On Windows, the system font is Segoe UI, on Mac OS X it is a different font. On Android and iOS, the system font is different again. If you want the font to be the same on all platforms, you have to set the textFont of the stack (or field) to a font name that is available on all platforms or include your own font.
I'm using a unique font for a web app that will be built using phone gap and deployed to Android. For android do I need to include all these different formats?
ttf, eot, woff and svg
I would rather not load a bunch of font files if they aren't necessary.
It doesn't hurt, TTF, SVG are widely used, EOT is not supported at all. The browser should only load one font file not all four so it doesn't hurt to have then declared for support sake.
http://caniuse.com/#feat=ttf
http://caniuse.com/#feat=woff
http://caniuse.com/#feat=svg
http://caniuse.com/#feat=eot
If you can can (ie you have font in that format) just use ttf fonts on android.
My company ships Android devices to control industrial equipment we make. We only ship one specific device running Android 2.36 that we buy in quantity and load our own app on, so we don't have to worry about accommodating different layouts, resolutions, etc.
We have a customer in Israel who would like us to have the legends on our buttons in Hebrew. Android 2.36 doesn't have good support for Hebrew (or RTL languages in general) so what we thought we would do is replace the text for these buttons with an image of the Hebrew text.
Since Hebrew is not a supported language on these devices I can't just put the whole device in Hebrew and have Android select the layout XML files with the images instead of text to use at runtime, so I think I might have to do it at build time, in other words have some kind of switch or setting that says use THESE layout resources instead of THOSE layout resources when building a Hebrew version of our product.
My Question: What's a good way to do that? Is there a simple way to force it to use a particular set of layout XML files at build time or am I thinking about this wrong?
If you're using Gradle for Android with Android Studio, this would be a fine place to use product flavors:
Have the bulk of your code and resources be in the main sourceset as normal
Define standard and hebrew product flavors in your build.gradle file
Have the normal (non-Hebrew) resources be in a standard sourceset
Have the Hebrew resources be in a hebrew sourceset
Then, a hebrew build will use the Hebrew layouts, while a standard build would use the normal layouts.
If Gradle for Android is not an option, since you control the hardware, you could drop some file in some special spot on the device, and check that when your process starts to determine if you should be in Hebrew-compatibility mode or not. This presumes that the users of the Android device do not have arbitrary access to it (so external storage would be safe) or that you inject the file into internal storage after installing your app (adb shell run-as should handle this, though I have only ever used it for read operations, not write operations).
I was going to say you could use the layout-LANG to specify region based layouts, but I don't think you can do that if the language isn't supported there.
https://developer.android.com/guide/topics/resources/localization.html
Does your app have a settings screen? You could simply have a setting to change all the layouts in run time.
Do you use Android Studio? Android studio allows different build profiles for debug, release, etc. You could set one up for Israel.