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

Selection internal Hershey fonts #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jihadist
Copy link
Contributor

@Jihadist Jihadist commented Jun 8, 2022

Proposal for a small switch for internal Hershey fonts, i.e. it's switch between ascii (default) and unicode fonts for opencv/4.*.
Possible solution for #32.

@wpalfi
Copy link
Collaborator

wpalfi commented Jun 8, 2022

Thanks for the proposal. But this kind of extensions adds much more complexity to the library than I want to maintain. The intention was always to have a minimalistic but flexible library. You could use custom drawables to enable font selection on top of cv-plot or you can of course provide a fork with more functionality.

As the library is (optionally) header-only, I dont think that a cmake-based solution is a good idea.

We could just replace FONT_HERSHEY_SIMPLEX by FONT_HERSHEY_COMPLEX everywhere instead. But in my experiments simplex just looked much better, at least for small fonts.

@Jihadist
Copy link
Contributor Author

Jihadist commented Jun 8, 2022

You could use custom drawables to enable font selection on top of cv-plot

Yep, I tried this firstly but it looks like a bit overhead because in this case I need to replace most part of cv-plot classes.

As the library is (optionally) header-only, I dont think that a cmake-based solution is a good idea.

I proposed compile-time cmake switch due to header-only option, I can propose runtime switch if you prefer this way.

But in my experiments simplex just looked much better, at least for small fonts

Yep, I agree with you! So I decided to stayed simplex as default font.

you can of course provide a fork with more functionality.

If there is no other way of course I'll use this way, but why not to try to propose changes to upstream :)

@wpalfi
Copy link
Collaborator

wpalfi commented Jun 8, 2022

Thanks again, I hope you understand that I decided to keep it simple. Why not also adding font size, color, alignment, padding, latex,...? That's not where I want to go.

@Jihadist
Copy link
Contributor Author

Jihadist commented Jun 8, 2022

Why not also adding font size, color, alignment, padding, latex,...?

I added another font for unicode support, not for another visual effects

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.

None yet

2 participants