Skip to content

Conversation

@biomurph
Copy link
Contributor

I found that the 7segment font was lacking a colon [:] and so I added it. Easy since it is the ascii char right after '9'.

@pingdan32
Copy link

how to calculate the value of FONT MAP WIDTH?

@pingdan32
Copy link

@biomurph

@biomurph
Copy link
Contributor Author

In the 7segment.h and the other util files there is a line at the top of the data block that explains how the first row defines these values. In this case, the FONT MAP WIDTH is a combination of the FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW. In 7segment.h, the value is 120

// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
10,16,46,12,1,20,

@pingdan32
Copy link

Thanks! But I want to know how the 120 is calculated?

@biomurph
Copy link
Contributor Author

I don't think it is calculated. I think it is hard coded by the font designer. You will have to ask the maintainer of this repo

@pingdan32
Copy link

Got it. Thanks!

@jimblom jimblom merged commit 453bdf4 into sparkfun:master Jun 25, 2018
@jimblom
Copy link
Contributor

jimblom commented Jun 25, 2018

@biomurph -- Sorry it took so long to pull this in. The colon looks great! Thank you for contributing!

@pingdan32 -- To calculate the FONT MAP WIDTH, we multiply the FONTWIDTH (10 in this file) by TOTAL CHARACTERS (12 here, which gives us 120).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants