Skip to content

Added a ':' to the 7segment font! #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2018
Merged

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