Skip to content
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

How to handle long names? #4

Open
dokato opened this issue Oct 5, 2020 · 2 comments
Open

How to handle long names? #4

dokato opened this issue Oct 5, 2020 · 2 comments

Comments

@dokato
Copy link
Collaborator

dokato commented Oct 5, 2020

Currently, there is not support for that...

@brennanpincardiff
Copy link
Contributor

Steps:

  1. count number of characters.
  2. decide what to do - options include breaking the name over two lines and/or reducing the character size.
    Q: where is the best place to put this code?
    Suggestions?

@dokato
Copy link
Collaborator Author

dokato commented Oct 15, 2020

That sounds like decent first heuristics. I see one problem: for different widths of a badge (that users can set), we would have to define different letter rule. Possible remedy: find an average letter width and divide it by width of the badge area.

Q: where is the best place to put this code?

The following two lines define name font sizes: https://github.com/satRdays/badgeR/blob/master/R/badger.R#L34 , eg. look \huge.
The rest should be done somewhere around here: https://github.com/satRdays/badgeR/blob/master/R/badger.R#L87 based o the badge_width and number of letters in first and second:
https://github.com/satRdays/badgeR/blob/master/R/badger.R#L91

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

No branches or pull requests

2 participants