Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Keeping a font, but filling up its missing characters.  (Read 1851 times)

0 Members and 1 Guest are viewing this topic.

Saadin Dassum

  • Newbie
  • *
  • Posts: 20
    • View Profile
Keeping a font, but filling up its missing characters.
« on: August 13, 2014, 05:13:37 am »
A few months ago, I finished a prototype music player program using SFML.  I ended up using Base 02 as its main font for the music player.  Unfortunately, Base 02 is very limited and it barely contains any characters other outside the range of the alphabet and numbers.  It looks very great with the program, so I really want to keep it, but I can't use any special characters to display the song titles, as an empty box will appear instead.  Is there any way to replace certain characters in an instance/object of sf::font?  For example, let's say I have:
sf::font base;
base.loadFromFile("base02.ttf");
 
I know an opening parenthesis text "(" is number 0040, but Base 02 lacks parenthesis characters, so writing an open parenthesis at any time would give me an empty box.  Is there any way to replace number 0040 (and other specific ones) with a character from another font?  Obviously I'd look for a similair font, but what I need to do now is just fill the blanks in so that the
base
object would stay as one instead of having to mess with multiple fonts for one string.  Thanks in advance for answers.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Keeping a font, but filling up its missing characters.
« Reply #1 on: August 13, 2014, 07:47:26 am »
No, you can't.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Keeping a font, but filling up its missing characters.
« Reply #2 on: August 13, 2014, 08:16:34 am »
SFML is not made for this, but I'm sure there are dedicated tools out there which can edit fonts.
Though honestly I'd switch to a different font. Having a different font for special characters would look quite odd. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Saadin Dassum

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Keeping a font, but filling up its missing characters.
« Reply #3 on: August 15, 2014, 04:27:50 am »
Alright.  Thanks guys.

 

anything