Show fonts

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Show fonts

Thomas Leonard Gertz
Is there a easy way to show all fonts, how they looks and name?



-----
Thomas Leonard Gertz
Kerteminde, Danmark
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Thomas Leonard Gertz
Kerteminde, Danmark
tp3
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

tp3
On 03.12.18 18:57, Thomas Leonard Gertz wrote:
> Is there a easy way to show all fonts, how they looks and name?
>
Yes and no, the list is available via Help->Font List and
you can drag&drop the name selection string from that list
into the editor.

There's no preview yet, but there's a feature request to
add this: https://github.com/openscad/openscad/issues/1395

ciao,
   Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

runsun
would it be easier to have a builtin name like *$fontnames* containing all
font names, so it is easy for users to come up with examples themselves ?



-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

Parkinbot
wouldn't a feature like this violate the iron law that OpenSCAD doesn't allow
for queries?

As soon as this law softens I would immediately propose variables like:
- $imports - reflect all imports as list_of(list_of(verts,faces))
- $cmdline - reflect and set all command line arguments
- $filename - reflect and set the actual filename for exports
- $uselibs - reflect and set used libs and their order
- $includelibs - reflect and set included libs
- $functions - reflect and set resolutionpaths of functions
- $modules - reflect resolutionpaths of modules
- $constants reflect resolutionpaths of constants
- $backgroundimage set image as background in viewport
- $echo2clipboard - stream text into clipboard
...
- $code - reflect and set(!) the actual code

and so on.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

Parkinbot
I forgot an important one:
$animation - read and set(!) animation parameters



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

runsun
I don't know about iron laws of OpenSCAD, but, for those queries you
mentioned, I want them all lol ...

Also add these:

$this => the name of func/mod in the current scope (but, I believe this is
incorporated into your $functions/$modules)
$arguments => the name and value of arguments inside a func/mod.

To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
echo():

echo(abc=123);

The OpenSCAD is able to catch and present the argument name, "abc". Why not
release this feature to user functions ?



-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer ); $ Tips ; $ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

nophead
LOL, it took a long argument to get $preview past the iron gates. Good luck with this list.

As $ bestows dynamic scope there should really be another prefix for built in variables that don't need to be dynamic. Probably one that isn't allowed for user variables so there can be no clash when introducing a new one.

On Fri, 7 Dec 2018 at 20:58, runsun <[hidden email]> wrote:
I don't know about iron laws of OpenSCAD, but, for those queries you
mentioned, I want them all lol ...

Also add these:

$this => the name of func/mod in the current scope (but, I believe this is
incorporated into your $functions/$modules)
$arguments => the name and value of arguments inside a func/mod.

To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
echo():

echo(abc=123);

The OpenSCAD is able to catch and present the argument name, "abc". Why not
release this feature to user functions ?



-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

kintel
Administrator
> On Dec 7, 2018, at 4:40 PM, nop head <[hidden email]> wrote:
>
> As $ bestows dynamic scope there should really be another prefix for built in variables that don't need to be dynamic. Probably one that isn't allowed for user variables so there can be no clash when introducing a new one.
>
Yes, that would make it a lot easier to manage these special, read-only queries

 -Marius
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

Parkinbot
Most of them shouldn't be read-only. As a Windows user for example I find it
too inconvenient to write shell scripts, thus I hardly ever use cmdline
syntax for OpenSCAD. So I would love a possiblity to set cmdline args from
within OpenSCAD.

As for the new prefix, my keyboard tells me there are not many characters
left without OpenSCAD semantics.
@ ~  § € ' ^ ² ³ ° µ

Maybe also $$ can be used, which is currently not allowed.






--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

MichaelAtOz
Administrator
This post was updated on .
In reply to this post by runsun
runsun wrote
> I don't know about iron laws of OpenSCAD, but, for those queries you
> mentioned, I want them all lol ...
>
> Also add these:
>
> $this => the name of func/mod in the current scope (but, I believe this is
> incorporated into your $functions/$modules)
> $arguments => the name and value of arguments inside a func/mod.
>
> To me, this 2nd one seems to be already a feature in OpenSCAD, as shown in
> echo():
>
> echo(abc=123);
>
> The OpenSCAD is able to catch and present the argument name, "abc". Why
> not
> release this feature to user functions ?
>
>
>
> -----
>
> $  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc (
> git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD
> lexer ); $ Tips ; $ Snippets
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

That is not some magical property, it was a hack to echo() AFAIK, for
example echo(str(a=1)); doesn't do the same.



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

nophead
In reply to this post by Parkinbot
I use Python to script the command line. Then it works on any OS as well.  

On Fri, 7 Dec 2018 at 22:25, Parkinbot <[hidden email]> wrote:
Most of them shouldn't be read-only. As a Windows user for example I find it
too inconvenient to write shell scripts, thus I hardly ever use cmdline
syntax for OpenSCAD. So I would love a possiblity to set cmdline args from
within OpenSCAD.

As for the new prefix, my keyboard tells me there are not many characters
left without OpenSCAD semantics.
@ ~  § € ' ^ ² ³ ° µ

Maybe also $$ can be used, which is currently not allowed.






--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts

runsun
In reply to this post by MichaelAtOz
Sure str() and echo() don't work the same. Only echo() has that hack.

What my point is that echo() can catch the argument name. It means
OpenSCAD already can do that, so it should not be totally new to let user
functions (or module) do that as well :

function f(len,width)=
  echo( $arguments )
  len_width;

a= f(5);
==> [ ["len",5], ["width", undef] ]



MichaelAtOz wrote
> That is not some magical property, it was a hack to echo() AFAIK, for
> example echo(str(a=1)); doesn't do the same.





-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts - and other esoteric things

MichaelAtOz
Administrator
runsun wrote
> function f(len,width)=
>   echo( $arguments )
>   len_width;
>
> a= f(5);
> ==> [ ["len",5], ["width", undef] ]

so just for debugging shortcut instead of

function f(len,width)=
  echo( len=len, width=width)
  len_width;

?



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts - and other esoteric things

MichaelAtOz
Administrator
function f(len,width)=
  [ ["len",len], ["width",width] ];

??



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts - and other esoteric things

Parkinbot
MichaelAtOz,

in OpenSCAD you can call functions and modules with an unlimited number of
arguments - e.g. you don't get an error with misspelled paraemeter names,
which can be nasty problem when it comes to tracking an error.
However, the good news (with respect to $arguments) is: Those arguments that
are not defined in the prototype are currently ignored. The bad news is:
they are not accessible at all. So you can't implement functions and modules
with a variable number of arguments unless you pack them into a list, parse
this list and solve the naming problem.  

myfunc(1,2,3,a=4,b=5,c=6);

module myfunc()   echo("works but no args declared");

So the new $arguments variable would allow for:

module myfunc()   echo("works withargs ", $arguments);

and give access to any provided parameters and its names which can also be
"$argument_x" if anonymous, as is the case in the call
myfunc(1,2,3,a=4,b=5,c=6);  

But let me mention that OpenSCAD already provides an even wierder mechanism.
You don't have to declare parameters at all. Why not just use them and trust
on the caller?

myfunc(1,2,3,a=4,b=5,c=6);

module myfunc()   echo("works even no args were declared: ", a, b, c);






--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Show fonts - and other esoteric things

runsun
In reply to this post by MichaelAtOz
Sorry there's a typo in my post. I was meant to say

function f(len,width)=
  echo( $arguments )
  len+width;   // not len_width;

It's to return len+width.

The "[ ["len",5], ["width", undef] ]" is to be displayed in the console due
to echo( $arguments )



MichaelAtOz wrote

> runsun wrote
>> function f(len,width)=
>>   echo( $arguments )
>>   len_width;
>>
>> a= f(5);
>> ==> [ ["len",5], ["width", undef] ]
>
> so just for debugging shortcut instead of
>
> function f(len,width)=
>   echo( len=len, width=width)
>   len_width;
>
> ?
>
>
>
> -----
> Admin - email* me if you need anything, or if I've done something
> stupid...
>
> * click on my MichaelAtOz label, there is a link to email me.
>
> Unless specifically shown otherwise above, my contribution is in the
> Public Domain; to the extent possible under law, I have waived all
> copyright and related or neighbouring rights to this work. Obviously
> inclusion of works of previous authors is not included in the above.
>
> The TPP is no simple “trade agreement.”   Fight it!
> http://www.ourfairdeal.org/   time is running out!
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

While we're talking about new system special variables... $systime

boxcarmib
I like some of the suggestions for adding some new system special variables… so I just thought I’d put forward my own.

$system … returns the system time in seconds a la unix.

I’m sure you’re all a lot more organized than I am in making your creations… but for my part I’m often looking at a desktop (literal… not virtual) of a whole bunch of test pieces I’ve printed and unable to tell which one is which.
I’ve taken to embedding some text in my models with a ‘build number’ but naturally I keep on forgetting to update the variable I use to set the build number. <sigh>
If there were a system special variable like $systime then I could easily massage that into a unique string variable to be included in my designs so that in the prototyping stage I’d be able to differentiate between all the test pieces I’d printed off.

Just my two cents.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: While we're talking about new system special variables... $systime

MichaelAtOz
Administrator
boxcarmib wrote
> If there were a system special variable like $systime then I could easily
> massage that into a unique string variable to be included in my designs so
> that in the prototyping stage I’d be able to differentiate between all the
> test pieces I’d printed off.

It is possible ATM with some fiddling.
You need a process somewhere, which just puts "$anyvariable=<whatever you
want>;" into a somename.scad file, repeatedly or on demand, for your case
every minute (say, to reduce potential file conflicts*).

Then "include <somename.scad>", and you have somewhat dynamic external
variables.

*I'm presuming, pretty firmly, that files are not locked on reading by
OpenSCAD; depending on the process used to update, there is a potential tiny
time when a file may be deleted just before the new one is created. And
OpenSCAD caches, but checks for updated files, so some experimentation is
required before using this for flight control purposes.



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: While we're talking about new system special variables... $systime

MichaelAtOz
Administrator
Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll
add a pointer back to this discussion.



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: While we're talking about new system special variables... $systime

boxcarmib
Thanks for this. Sorry… I should have done a more comprehensive search of existing topics before throwing my hat in the ring.


> On Dec 8, 2018, at 2:13 PM, MichaelAtOz <[hidden email]> wrote:
>
> Note for GitHub users https://github.com/openscad/openscad/issues/380, I'll
> add a pointer back to this discussion.
>
>
>
> -----
> Admin - email* me if you need anything, or if I've done something stupid...
>
> * click on my MichaelAtOz label, there is a link to email me.
>
> Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
>
> The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
12