B4A Library CustomFonts

Discussion in 'Additional libraries, classes and official updates' started by NJDude, Oct 21, 2017.

  1. NJDude

    NJDude Expert Licensed User

    This library will allow you to set custom fonts to views easily.


    1- B4A 7.x.

    2- Copy the CustomFonts.xml and CustomFonts.jar to your additional libraries directory.

    Private RobotoThin As CustomFonts

    The methods are self-explanatory, see attached sample for more details.



    Attached Files:

  2. Star-Dust

    Star-Dust Expert Licensed User

    Wow. Great
  3. Almora

    Almora Active Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    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.
  5. Mahares

    Mahares Well Known Member Licensed User

    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.
    Pencil3, JNG, jimmyF and 2 others like this.
  6. MitchBu

    MitchBu Active Member Licensed User

    Sorry for asking the obvious, but ... Where is "your additional libraries directory" ? I tried putting the files in Objects\b4xlibs but it does nothing...
  7. mangojack

    mangojack Well-Known Member Licensed User

    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 likes this.
  8. MitchBu

    MitchBu Active Member Licensed User

    Superb. Once again, you enlighten me. Thank you, mangojack :)
    mangojack likes this.
  9. Napier

    Napier New Member Licensed User

    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.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice