Oct 21, 2017 Replies: 8 This library will allow you to set custom fonts to views easily. Requirements: 1- B4A 7.x. 2- Copy the CustomFonts.xml and CustomFonts.jar to your additional libraries directory. Usage: Code: Copy Private RobotoThin As CustomFonts RobotoThin.Initialize("Roboto-Thin.ttf") RobotoThin.SetCustomFontsToAllViews(Activity) The methods are self-explanatory, see attached sample for more details. Screenshot: Attachments CustomFonts_Lib_1.0.zip CustomFonts_Lib_1.0.zip 4.5 KB · Views: 1,479 CustomFonts_Sample.zip CustomFonts_Sample.zip 189.4 KB · Views: 1,390 Click to expand...
This library will allow you to set custom fonts to views easily. Requirements: 1- B4A 7.x. 2- Copy the CustomFonts.xml and CustomFonts.jar to your additional libraries directory. Usage: Code: Copy Private RobotoThin As CustomFonts RobotoThin.Initialize("Roboto-Thin.ttf") RobotoThin.SetCustomFontsToAllViews(Activity) The methods are self-explanatory, see attached sample for more details. Screenshot:
Erel B4X founder Staff member Licensed User Longtime User Oct 22, 2017 #4 Thank you for sharing! As this is a B4A written library, it would be great if you can share the library source code as well. The benefits are: 1. Other developers can change if needed. 2. The source code can probably be slightly modified and be supported by B4J and B4i as well. 3. Source code is more future proof than compiled libraries.
Thank you for sharing! As this is a B4A written library, it would be great if you can share the library source code as well. The benefits are: 1. Other developers can change if needed. 2. The source code can probably be slightly modified and be supported by B4J and B4i as well. 3. Source code is more future proof than compiled libraries.
M Mahares Expert Licensed User Longtime User Oct 27, 2017 #5 It is amazing. Every time @NJDude develops a library , here is what you get out of it: 1. A real library and not a wrapper that has real world applications. 2. Simple to understand and use. 3. Small footprint. 4. No extra Read Only files or folders. 5 His example is simple enough for all of us to follow and apply to ours.
It is amazing. Every time @NJDude develops a library , here is what you get out of it: 1. A real library and not a wrapper that has real world applications. 2. Simple to understand and use. 3. Small footprint. 4. No extra Read Only files or folders. 5 His example is simple enough for all of us to follow and apply to ours.
MitchBu Well-Known Member Licensed User Longtime User May 11, 2019 #6 Sorry for asking the obvious, but ... Where is "your additional libraries directory" ? I tried putting the files in Objects\b4xlibs but it does nothing...
Sorry for asking the obvious, but ... Where is "your additional libraries directory" ? I tried putting the files in Objects\b4xlibs but it does nothing...
mangojack Expert Licensed User Longtime User May 11, 2019 #7 MitchBu said: Sorry for asking the obvious, but ... Where is "your additional libraries directory" ? I tried putting the files in Objects\b4xlibs but it does nothing... Click to expand... I would avoid placing any additional libs within a project folder. (That lib might serve another project in the future) I have mine located in a Documents/Dropbox folder titled 'B4A' .. it contains various project folders & another for 'Additional Libraries' Then just point to that folder in IDE > Tools > Configure Paths > Additional Libraries. Last edited: May 11, 2019
MitchBu said: Sorry for asking the obvious, but ... Where is "your additional libraries directory" ? I tried putting the files in Objects\b4xlibs but it does nothing... Click to expand... I would avoid placing any additional libs within a project folder. (That lib might serve another project in the future) I have mine located in a Documents/Dropbox folder titled 'B4A' .. it contains various project folders & another for 'Additional Libraries' Then just point to that folder in IDE > Tools > Configure Paths > Additional Libraries.
MitchBu Well-Known Member Licensed User Longtime User May 11, 2019 #8 Superb. Once again, you enlighten me. Thank you, mangojack
Napier New Member Licensed User Jul 10, 2019 #9 Thanks NJDude. Just translating my project over to b4a and this was very helpful. I thought the conversion would be straightforward, and I was a bit shocked at how fonts are so very different than in b4i.
Thanks NJDude. Just translating my project over to b4a and this was very helpful. I thought the conversion would be straightforward, and I was a bit shocked at how fonts are so very different than in b4i.