Hi
I’ve been messing around with the extended characters of DejaVu Sans and noticed they render really well from the canvas label.
However there seems to be a difference with the way windows and linux render fonts.
I’m not even sure if the same operating system will render a patch the same on another computer
So here is a little abstraction of a visually hi-res rotating knob made from three canvases and a vslider.
There is a windows version produced with windows 10 at 1920 x 1080
and a Linux version produced with Ubuntu Studio at 1366 x 768 in which I’ve manually adjusted the windows version.
I wonder if DejaVu Sans is the only font for canvases.
Please test/use the attached patches and any response or ideas welcome
cknob.zip
Cheers
Balwyn
-
DejaVu Knob
-
oops! wrong zip
cknob.zip -
Hello again
I think I may have solved the scaling issue. I was using characters from "DeJaVu Sans" instead of "DeJaVu Sans Mono" that Pd defaults to
Cheers
Balwyn
cknob-fixed-maybe.zip -
@Balwyn That looks better...... in fact very nice!
The only fault? (win7 extended) I see is that as the knob size is increased the underlying canvas stays the same size, so the "pick-up" editing area for the mouse pointer does not expand to the whole knob........
...... should be an easy fix, and then it ill be perfect!But in vanilla under windows I had set a different font. The built-in font is I think "Tahoma" and that still causes scaling problems of course. But I have tried setting "DejaVu Sans Mono" at startup, and the same problem persists for dejavu_font_stuff. Cknob is good, but the chess pieces are displaced slightly to the right.
Changing the font to "Consolas" fixes the scaling for that, and ruins it for c-knob!.... see below......I have been trying for a while to find a way to impose a font on a patch, independently of the start-up flag....... without any luck so far...
David.
-
@whale-av Hi again David, I've gone forward heaps with this, fully scalable size, colourable, min & max range and now another hurdle. [donecanvadialog] I think is causing a save changes dialog to pop up for each instance, but without it I can't change the GOP size.
Regarding the fonts, on my Win10 and Ubuntu Pd-extended there are 3 fonts names for canvas properties 'DeJaVu Sans Mono, Helvetica & Times and they appear to relate to the [label_font font# fontsize( message, where DeJaVu Sans Mono = 0.
I am also pretty sure I was using start-up flag "-font-face Consolas", but it no longer shows in the preferences.
Cheers
Balwyn
dotknob.zip -
@Balwyn Hello Balwyn,
You need to use the "dirty" tag...... I have no idea where I found that......
So something like.......
[donecanvasdialog <args>, dirty 0(
|
[send mycanvas]and that will kill the pop-up thing.......
David.
-
@whale-av, Thank you very much David that did the trick.
I have a few patches that need that fix.
Cheers
Balwyn -
I see you use an static circle as background, there is a basic circle you could use and i think it will be compatible with de different OSS
Hope it works
Greener -
@Greener Hi thanks for the reply, that was my last resort to us structs. I just liked the smooth rendering of fonts.
If only there was a way to temporarily change the default font from within a patch
@whale-av Hi David I apparently wasn't using Consolas, and when I changed it using your method of start-up flag "-font-face Consolas" in your Woof! post it went out of kilter. Then I Reset to defaults in preferences and of course had to setup my asio & midi settings again.
So back to the drawing board
Cheers
Balwyn -
Ok, Data Structures it is then.
Here is an early version with ugly artifact problems and magical disappearances but I would just like to know if it renders accurately on other systems
Cheers
Balwyn