Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Custom text colors?

  • naelstrof

    Attempting to set the banner to a dark image for a dark theme leaves some text black on black.

    Looking through refind.conf there is no options to change the text color, leaving dark themes unfeasible for use if you want readable text.

    Am I missing something or is this a missing feature?

  • I'm afraid it's not possible to do this at the moment, except by modifying the font image file and recompiling rEFInd. It's on my to-do list (, but I can make no promises about when this feature might appear.

  • naelstrof

    Thanks for such a quick reply, glad to hear you're working on it.

    Is it a difficult feature to implement? If you were to point me in the right direction I could look into implementing it.

    I'd learn how myself, but I hate digging through other peoples' build systems uGhg.

  • The quick-and-dirty way is to modify the font.png file in the images subdirectory of the source tree. (I seem to have forgotten to include this in the regular source packages, but I've just uploaded it to the git repository. You'd then need to use the script to convert that to a C header file and replace the libeg/egemb_font.h file in the source code. You could then recompile with your modified font. The problem with this approach is that you'll have to rebuild every binary.

    A better approach, but one that would take more effort initially, would be to modify the font-handling code in files in libeg, and probably set options to help with this in refind/config.c. You could do something that modifies the font color using more-or-less the existing setup; add support to load separate ICNS files as fonts; or add something to use a more traditional bitmap font format and set the font color. Ultimately, I hope to do the last of these things; but I haven't yet had time to study the existing code and track down suitable sample code. (In case you didn't know, I didn't write most of the existing code in libeg; I just inherited it from rEFIt.) If you're interested in doing any of these things, I'd be happy to discuss it in more detail by e-mail.

  • naelstrof

    Yes I am quite interested; I have lots of experience with fonts in c++ (unicode, font faces, and such), but unfortunately this is all using OpenGL.

    If I get some free time I'll certainly look into implementing some text features. I'll keep you informed of what I'm doing, that way you can keep certain features you feel strongly in to yourself.

    Thanks for pointing out my files of interest, that's exactly what I needed.
    Unless I email/post here assume I'll be doing nothing till then.

    Oh, and my email is if you would like to contact me more easily.

    Last edit: naelstrof 2012-12-05
  • My latest test version offers some limited improvements on this score; it now detects the background color for text and sets the text to black or white against bright or dark backgrounds, respectively. This test version is available as source code in git, and as a binary here:

    This is obviously a "baby step," and I intend to do more with this in the future. It should help those who want to use dark backgrounds today, though.