BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Reading BT815 font metrics  (Read 5657 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Reading BT815 font metrics
« on: February 20, 2023, 06:38:03 PM »

I am playing with reading the BT815 font metrics and the results do not match the "Table 4-8 ROM Font Table" in version 1.2 of the BT817/BT818 or version 1.0 of the BT81x datasheet.
For font 28 I get L4/9/18/25 while the datasheet has L4/9/19/25.

Now table 4-9 lists a width of 19 pixels for "@" and "M" and the width value I am reading from the table is indeed 19.
For "W" I get a value of 18, for "R" I get a value of 13 and both match table 4-9 as well.

There seems to be at least a bug with rom_font.pixel_width of font 28?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Reading BT815 font metrics
« Reply #1 on: February 21, 2023, 12:45:44 PM »

Hello Rudolph,

Thankyou for your post.

I've performed a couple of quick tests and can see the font header returning a width of 18 for font 28.
I'm going to chase this up with the development team to see if they have any insight.

Best Regards,
BRT Community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Reading BT815 font metrics
« Reply #2 on: February 22, 2023, 03:14:00 PM »

Hello,


I've heard back from he developer on this point:

Code: [Select]
The purpose of width in the width table is to denote the distance to move right when rendering the character.
This includes the character itself, plus the 1-pixel space between characters.
So the widest character can be 18 pixels, with a maximum "width" of 19 pixels.

As such the rom_font.pixel_width is listing the widest character, but not including the 1 pixel spacing. Where as the individual charter widths are listing the widths with the 1 pixel spacing included, as this would be the actual width of the character when displayed on screen.

Best Regards,
BRT Community
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: Reading BT815 font metrics
« Reply #3 on: February 22, 2023, 05:16:06 PM »

Ok, then it looks like the datasheet needs a revision.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 732
    • View Profile
Re: Reading BT815 font metrics
« Reply #4 on: February 23, 2023, 01:10:15 PM »

Hello,

Thanks for your feedback, we will look into updating the datasheet to make this more clear.

The value listed in datasheet for “font width(max)” row refers to the maximum width value of all ASCII chars listed in the same table of the datasheet.

The font width value for font 28 ‘@’ symbol is 19, which includes the ‘@’ symbol image bitmap width (18 pixel) plus spacing to next char (1 pixel). The bitmap handler will use this value to determine the starting position of next text char in the text string.


Best Regards,
BRT Community
Logged