Good morning!
I wonder if there is any way to find actual text string width in pixels when it is drawn with CMD_TEXT and ROM font?
I want to draw color highlighted multiline text on my screen, so I need to know where to start next portion of text after some text is drawn.
Determining the width of text drawn with CMD_TEXT
Moderator: Mods
-
- Matrix Orbital
- Posts: 745
- Joined: Thu Dec 13, 2001 4:00 pm
- Location: Earth.... I think..
- Contact:
Re: Determining the width of text drawn with CMD_TEXT
While the eve offers no function to quickly get the size of a string, you can download the rom font header from the unit and calculate this your self, in AN_033 - BT81X programming guide see sections:
5.4.1 (Legacy Font Metrics Block) and
5.4.2 (Example to find the width of character)
do note that section 5.4.3 that directly follows and has a handy looking code sample, is NOT applicable to the rom fonts as they use the legacy font metrics block.
5.4.1 (Legacy Font Metrics Block) and
5.4.2 (Example to find the width of character)
do note that section 5.4.3 that directly follows and has a handy looking code sample, is NOT applicable to the rom fonts as they use the legacy font metrics block.