Hi,
I need to edit the Helvetica Font (or any other one) in Debian for cosmetic reasons.
I need underscores in names and it looks really ugly on the screen.
I used to put something just over these underscore lines but this cuts off some of the lower pixels.
It also is extremely messy since always the last object is on top.
So if I edit the text the lines are back.
What I want to do is editing one of the fonts that are available with underscores being displayed as blank characters.
However, I do not know the location of the font that needs to be edited. I. e. where Pd is loading it from.
Thanks for helping me to find it!
Ingo
Em seg., 28 de set. de 2020 às 08:08, Ingo ingo@miamiwave.com escreveu:
I need underscores in names
why? pd understands spaces in symbols
What I want to do is editing one of the fonts that are available with underscores being displayed as blank characters.
there are also other characters you can use that are not an underline nor a space that won't display anything and will look like a space, but one way or another you don't need to go to the extent of editing your font, I strongly believe.
Thanks Alexandre!
It didn't work before because I used [sprintf %s%s] or [label $1 $2(. Now I replaced the underscores with spaces right before I'm sending to the canvas label or [tof/pmenu] and it works perfectly fine.
Ingo
From: Alexandre Torres Porres [mailto:porres@gmail.com] Sent: Monday, September 28, 2020 7:06 PM To: Ingo Cc: Pd-List Subject: Re: [PD] Helvetica Font in Debian 9.5 - Location?
Em seg., 28 de set. de 2020 às 08:08, Ingo ingo@miamiwave.com escreveu:
I need underscores in names
why? pd understands spaces in symbols
What I want to do is editing one of the fonts that are available with underscores being displayed as blank characters.
there are also other characters you can use that are not an underline nor a space that won't display anything and will look like a space, but one way or another you don't need to go to > the extent of editing your font, I strongly believe.
On 2020-09-29 14:00, Ingo wrote:
It didn't work before because I used [sprintf %s%s] or [label $1 $2(.
the proper syntax (as you probably know) is: [label $1\ $2(
and it didn't work "before", as the ability to escape the space character was added rather recently to Pd (Pd>=0.51!)
fgmadsr IOhannes
Thank you, IOhannes!
I'm still on 0.49 (and cannot update atm for compatibility reasons). Replacing the underscores with spaces just before sending works fine for what I need, though!
Ingo
-----Original Message----- From: Pd-list [mailto:pd-list-bounces@lists.iem.at] On Behalf Of IOhannes m zmoelnig Sent: Tuesday, September 29, 2020 2:32 PM To: pd-list@lists.iem.at Subject: Re: [PD] Helvetica Font in Debian 9.5 - Location?
On 2020-09-29 14:00, Ingo wrote:
It didn't work before because I used [sprintf %s%s] or [label $1 $2(.
the proper syntax (as you probably know) is: [label $1\ $2(
and it didn't work "before", as the ability to escape the space character was added rather recently to Pd (Pd>=0.51!)
fgmadsr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Em ter., 29 de set. de 2020 às 09:01, Ingo ingo@miamiwave.com escreveu:
Thanks Alexandre!
It didn't work before because I used [sprintf %s%s]
If you're using cyclone's [sprintf], it can generate symbols with the "symout" argument. This joins several items separated by spaces into a single symbol. But, as I explain in its help file, this is basically useless now as you can just escape spaces with backslashes...
I also updated the help file of [makefilename] to show how to use backslashes in that object, as well as the iemguis' help file to show how you can set labels with spaces too.
cheers
On 29/09/2020 16:05, Alexandre Torres Porres wrote:
I also updated … the iemguis' help file to show how you can set labels with spaces too.
If I set a label with an escaped space per the help file, and I then right click on the nbx and select properties, I get a TCL unhandled error message (and no properties window):
<quote> (Tcl) UNHANDLED ERROR: wrong # args: should be "pdtk_iemgui_dialog mytoplevel mainheader dim_header wdt min_wdt wdt_label hgt min_hgt hgt_label rng_header min_rng min_rng_label max_rng max_rng_label rng_sched lin0_log1 lilo0_label lilo1_label loadbang steady num_label num snd rcv gui_name gn_dx gn_dy gn_f gn_fs bcol fcol lcol" while executing "pdtk_iemgui_dialog .gfxstub558554bfed90 |nbx| -------dimensions(digits)(pix):------- 5 1 width: 14 8 height: -----------output..." ("uplevel" body line 1) invoked from within "uplevel #0 $docmds" </quote>
I attach an example patch, but I can do this directly in the “pd font/label” subpatch of the “pd properties” subpatch of numbox2-help.pd. (Pd version 0.51.2 on Linux.)
It does seem to be the space that is the problem: try [symbol no_space( in the example patch.
Is this a known bug? Is it just me?
Best
m
Em ter., 29 de set. de 2020 às 14:26, matthew brandi mfbrandi@outlook.com escreveu:
On 29/09/2020 16:05, Alexandre Torres Porres wrote:
I also updated … the iemguis' help file to show how you can set labels with spaces too.
If I set a label with an escaped space per the help file, and I then right click on the nbx and select properties, I get a TCL unhandled error message (and no properties window):
I actually know that but didn't say it :/ sorry
there's already a fix for this and hopefully this will be merged and work on the next update ;)
<quote> (Tcl) UNHANDLED ERROR: wrong # args: should be "pdtk_iemgui_dialog mytoplevel mainheader dim_header wdt min_wdt wdt_label hgt min_hgt hgt_label rng_header min_rng min_rng_label max_rng max_rng_label rng_sched lin0_log1 lilo0_label lilo1_label loadbang steady num_label num snd rcv gui_name gn_dx gn_dy gn_f gn_fs bcol fcol lcol" while executing "pdtk_iemgui_dialog .gfxstub558554bfed90 |nbx| -------dimensions(digits)(pix):------- 5 1 width: 14 8 height: -----------output..." ("uplevel" body line 1) invoked from within "uplevel #0 $docmds" </quote>
I attach an example patch, but I can do this directly in the “pd font/label” subpatch of the “pd properties” subpatch of numbox2-help.pd. (Pd version 0.51.2 on Linux.)
It does seem to be the space that is the problem: try [symbol no_space( in the example patch.
Is this a known bug? Is it just me?
Best
m
-- matthew brandi _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 29/09/2020 18:57, Alexandre Torres Porres wrote:
Em ter., 29 de set. de 2020 às 14:26, matthew brandi escreveu:
If I set a label with an escaped space per the help file, and I then right click on the nbx and select properties, I get a TCL unhandled error message (and no properties window):
I actually know that but didn't say it :/ sorry
No problem, Alexandre. I should have guessed. ;)
Best
m
oh, and the workaround so far is that you can set a label without spaces via a message to access the properties windows back in the meantime ;)
Em ter., 29 de set. de 2020 às 16:18, matthew brandi mfbrandi@outlook.com escreveu:
On 29/09/2020 18:57, Alexandre Torres Porres wrote:
Em ter., 29 de set. de 2020 às 14:26, matthew brandi escreveu:
If I set a label with an escaped space per the help file, and I then
right click on
the nbx and select properties, I get a TCL unhandled error message (and
no
properties window):
I actually know that but didn't say it :/ sorry
No problem, Alexandre. I should have guessed. ;)
Best
m
-- matthew brandi | 020 8882 4616
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Alexandre Torres Porres wrote:
oh, and the workaround so far is that you can set a label without spaces via a message to access the properties windows back in the meantime ;)
Another workaround to consider is to replace a normal space with a non-breaking space (ASCII 160)
as a matter of fact there are several characters that are problematic for Tcl/Tk related objects (such as all vanilla GUI objects but also externals like "menubutton" etc.) and will produce an error message when you save/reopen a patch or try to edit it's properties.
as a personal "helper" i made myself a "TCL/TK save" patch to throw in before creating a label for a GUI, that exchanges all of those problematic characters with save ones. (see attachemnt).
of course this is only good for optical usecases (as it actually would also alter filenames etc.). it's really just a workaround and doesn't solve the underlying problem with Tcl/Tk
best
oliver
On 2020-09-29 19:57, Alexandre Torres Porres wrote:
Em ter., 29 de set. de 2020 às 14:26, matthew brandi mfbrandi@outlook.com escreveu:
On 29/09/2020 16:05, Alexandre Torres Porres wrote:
I also updated … the iemguis' help file to show how you can set labels with spaces too.
If I set a label with an escaped space per the help file, and I then right click on the nbx and select properties, I get a TCL unhandled error message (and no properties window):
I actually know that but didn't say it :/ sorry
there's already a fix for this and hopefully this will be merged and work on the next update ;)
something seems to be wrong with your clock. here it is september 2020, and the properties dialog works *fine* with labels that contain spaces. it's probably because i use Pd-0.51 (the fix has been submitted by miller somewhen between Pd-0.50-2 and Pd-0.51-0test1).
the only issue left is, that the propertie-dialog will convert any spaces in the label to underscores before sending them back. (so it gets the label with spaces just fine, displays them; but as soon as you hist "Apply" you get a label with underscores)
gfamdsr IOhannes
On 30/09/2020 07:40, IOhannes m zmoelnig wrote:
something seems to be wrong with your clock. here it is september 2020, and the properties dialog works *fine* with labels that contain spaces. it's probably because i use Pd-0.51 (the fix has been submitted by miller somewhen between Pd-0.50-2 and Pd-0.51-0test1).
Dear IOhannes
That seems a little harsh. Consider the following simple test patch:
#N canvas 515 93 1400 981 12; #X msg 116 85 label space\ cadet; #X obj 116 152 bng 15 250 50 0 empty empty space\ cadet 17 7 0 10 -262144 -1 -1; #X connect 0 0 1 0;
Open the patch in Pd; click the message box; then try to open the properties dialogue (with the right-click menu).
On Pd version 0.51.2 on Linux, I get a TCL error (and no properties dialogue):
(Tcl) UNHANDLED ERROR: wrong # args: should be "pdtk_iemgui_dialog mytoplevel mainheader dim_header wdt min_wdt wdt_label hgt min_hgt hgt_label rng_header min_rng min_rng_label max_rng max_rng_label rng_sched lin0_log1 lilo0_label lilo1_label loadbang steady num_label num snd rcv gui_name gn_dx gn_dy gn_f gn_fs bcol fcol lcol" while executing "pdtk_iemgui_dialog .gfxstub55f245fc3420 |bang| ----------dimensions(pix):----------- 15 8 size: 0 0 empty --------flash-time(m..." ("uplevel" body line 1) invoked from within "uplevel #0 $docmds"
It is true that if I open the patch and go straight to the properties dialogue without clicking the message box first, the properties dialogue works as you say.
Best
m
On 2020-09-30 12:25, matthew brandi wrote:
It is true that if I open the patch and go straight to the properties dialogue without clicking the message box first, the properties dialogue works as you say.
ah, this is what you meant. sorry that i didn't get it.
anyhow, this is fixed in PR#953, as alex already pointed out.
gfadmsr IOhannes