I created a lightweight alternative to sftdlib for drawing text in sf2dlib.

Discussion in '3DS - Homebrew Development and Emulators' started by flarn2006, Jun 11, 2016.

  1. flarn2006
    OP

    flarn2006 GBAtemp Fan

    Member
    3
    Apr 6, 2014
    United States
    I didn't like all the overhead that sftdlib requires just to draw text in sf2dlib, so I created my own text drawing "library" that uses simpler bitmap-based fonts.

    https://github.com/flarn2006/SF2DBmpFont

    See the readme for more information.

    Here's a screenshot of the example program:

    [​IMG]
     
    Joel16, Februarysn0w, RedHat and 4 others like this.
  2. Conn0r

    Conn0r GBAtemp Fan

    Member
    3
    Jan 10, 2016
    United States
    Nice lib. I will read some books in this lib. jk it's actually pretty good ;)
     
  3. flarn2006
    OP

    flarn2006 GBAtemp Fan

    Member
    3
    Apr 6, 2014
    United States
    Well it is a text drawing library.
     
  4. roei

    roei Member

    Newcomer
    1
    Mar 3, 2014
    Iceland
    Thanks for sharing, I actually did something similar in C but much shittier so I never thought to share it D:

    anyway, good job!
     
  5. RedHat

    RedHat GBAtemp Regular

    Member
    3
    Oct 10, 2015
    United States
    Mii Plaza
  6. flarn2006
    OP

    flarn2006 GBAtemp Fan

    Member
    3
    Apr 6, 2014
    United States
  7. RedHat

    RedHat GBAtemp Regular

    Member
    3
    Oct 10, 2015
    United States
    Mii Plaza
    No problem! I was just about to look for a font library when I saw yours and was like, bingo. It works so well, thanks (even in plain c)!
     
  8. flarn2006
    OP

    flarn2006 GBAtemp Fan

    Member
    3
    Apr 6, 2014
    United States
    Wait, how are you getting it to work in plain C?
     
  9. RedHat

    RedHat GBAtemp Regular

    Member
    3
    Oct 10, 2015
    United States
    Mii Plaza
    I wrote a wrapper method in C++ and used the keyword "extern "C" somemethod() {" to define a method that c can use. Then the C linker can use C++ code. It works very well!
     
  10. darkxex

    darkxex Member

    Newcomer
    1
    Jun 13, 2016
    Cote d'Ivoire
    thanks. i try most later (sorry the bad english)
     
  11. phalk

    phalk Handheld Maniac

    Member
    5
    Apr 23, 2009
    Brazil
    This is quite useful. I've had to code something similar to use with LPP+ (in lua) lol.
     
  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