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

Add setting to display to lower case tags #352

Open
YNCBearz opened this issue Mar 28, 2021 · 1 comment
Open

Add setting to display to lower case tags #352

YNCBearz opened this issue Mar 28, 2021 · 1 comment
Labels

Comments

@YNCBearz
Copy link

Is it available to add setting about tag selection (display to lower case)?

@breandan breandan changed the title about tag selection display Add setting to display to lower case tags Mar 28, 2021
@breandan
Copy link
Collaborator

breandan commented Apr 17, 2021

Although it sounds like a simple feature, the problem with lower case tags is that the tag rendering algorithm becomes more complicated, since we would need to compute the center of the box when painting the letters, otherwise some letters like yjp will spill outside the boundaries. If anyone wants to give it a stab, here is where this is done:

private fun drawForeground(g: Graphics2D, font: TagFont, point: Point, text: String) {
val x = point.x + 2
val y = point.y + font.baselineDistance
g.font = font.tagFont
if (!ColorUtil.isDark(AceConfig.tagForegroundColor)) {
g.color = Color(0F, 0F, 0F, 0.35F)
g.drawString(text, x + 1, y + 1)
}
g.color = AceConfig.tagForegroundColor
g.drawString(text, x, y)
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants