cv-plot icon indicating copy to clipboard operation
cv-plot copied to clipboard

Selection internal Hershey fonts

Open xakod opened this issue 3 years ago • 4 comments

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.

xakod avatar Jun 08 '22 10:06 xakod

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.

wpalfi avatar Jun 08 '22 11:06 wpalfi

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 :)

xakod avatar Jun 08 '22 11:06 xakod

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.

wpalfi avatar Jun 08 '22 13:06 wpalfi

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

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

xakod avatar Jun 08 '22 13:06 xakod