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

Author Topic: is it possible to set individual glyphs size in sfml?  (Read 1149 times)

0 Members and 1 Guest are viewing this topic.

codinglexernewbie

  • Newbie
  • *
  • Posts: 4
    • View Profile
is it possible to set individual glyphs size in sfml?
« on: July 11, 2022, 11:35:22 am »
for example i have a glyph:'Σ' and i want to make it 30 by 50, how do i do that?
so in a string : aΣ3 where the character height is 40, i want the Σ to be 30

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: is it possible to set individual glyphs size in sfml?
« Reply #1 on: July 11, 2022, 11:55:28 am »
It's not possible to size characters differently within on sf::Text instance.

Things you can do is use multiple sf::Text instances and calculate the positioning manually.
Or implement your own text rendering class (quite a bit of effort), which can handle such cases.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything