Re: [Newbies] What font do you use in macOS ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Christoph Thiede

It would be great if the Trunk image would contain more sizes of this font by default, perhaps 1 to: 72 by: 1 ...


Or could you maybe provide a dense set of generated PNGs in the release section of your repo? For all the people who don't have a mac :-)


Best,
Christoph

Von: Beginners <[hidden email]> im Auftrag von Tobias Pape <[hidden email]>
Gesendet: Samstag, 7. Dezember 2019 09:30:23
An: A friendly place to get answers to even the most basic questions about Squeak.
Betreff: Re: [Newbies] What font do you use in macOS ?
 

> On 07.12.2019, at 09:15, Nicola Mingotti <[hidden email]> wrote:
>
> Hi,
>
> I am quite happy with the font I can get in Unix but, paradoxically enough, I can't get what I want in macOS, where graphics usually is far better.
>
> So, the point is, in macOS the only font I can see well (except for the Accu*) is the "Bitmap DejaVu Sans". I use it usually at "size" 12, but I would like to have it a little smaller, unfortunately the next available size is 9, which is too small for me.
>
> I tried to read all what I could on the web. As far as I understand Bitmap DejaVu Sans works better because it was "handmade". And for the same reason, to have it at a different pointsize it must be wholly handcrafted again each time.
>
> TTF do not work well because we don't have a renderer inside Squeak, there appear to be external plugins to use Cairo, but I don't find them for macOS.
>
> (excuse my barbaric approximations, I am totally profane in the world of fonts).
>
> So my questions are:
>
> What font do you use ?
>
> Are you able to get something good at different scales ?
> I don't need multi-lang stuff, ASCII is enough.
>
> I could make another pointsize or two for the "Bitmap DejaVu Sans" but I need some point to start, some documentation or example.
>

Here's a starting point: https://github.com/krono/Squeak-Fonts
That's what I used to generate the current sizes of Bitmap DejaVu Sans.

Best regards
        -Tobias


> bye
> Nicola
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Tobias Pape

> On 07.12.2019, at 14:36, Thiede, Christoph <[hidden email]> wrote:
>
> It would be great if the Trunk image would contain more sizes of this font by default, perhaps 1 to: 72 by: 1
> ...

If only "that" wouldn't take up so much money

>
> Or could you maybe provide a dense set of generated PNGs in the release section of your repo? For all the people who don't have a mac :-)

Err. I am unsure whether the licenses permit that and I have no time to check.
but per se, sureā€¦

Best regards
        -Tobias

>
> Best,
> Christoph
> Von: Beginners <[hidden email]> im Auftrag von Tobias Pape <[hidden email]>
> Gesendet: Samstag, 7. Dezember 2019 09:30:23
> An: A friendly place to get answers to even the most basic questions about Squeak.
> Betreff: Re: [Newbies] What font do you use in macOS ?
>  
>
> > On 07.12.2019, at 09:15, Nicola Mingotti <[hidden email]> wrote:
> >
> > Hi,
> >
> > I am quite happy with the font I can get in Unix but, paradoxically enough, I can't get what I want in macOS, where graphics usually is far better.
> >
> > So, the point is, in macOS the only font I can see well (except for the Accu*) is the "Bitmap DejaVu Sans". I use it usually at "size" 12, but I would like to have it a little smaller, unfortunately the next available size is 9, which is too small for me.
> >
> > I tried to read all what I could on the web. As far as I understand Bitmap DejaVu Sans works better because it was "handmade". And for the same reason, to have it at a different pointsize it must be wholly handcrafted again each time.
> >
> > TTF do not work well because we don't have a renderer inside Squeak, there appear to be external plugins to use Cairo, but I don't find them for macOS.
> >
> > (excuse my barbaric approximations, I am totally profane in the world of fonts).
> >
> > So my questions are:
> >
> > What font do you use ?
> >
> > Are you able to get something good at different scales ?
> > I don't need multi-lang stuff, ASCII is enough.
> >
> > I could make another pointsize or two for the "Bitmap DejaVu Sans" but I need some point to start, some documentation or example.
> >
>
> Here's a starting point: https://github.com/krono/Squeak-Fonts
> That's what I used to generate the current sizes of Bitmap DejaVu Sans.
>
> Best regards
>         -Tobias
>
>
> > bye
> > Nicola
> >
> >
> >
> >
> >
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

timrowledge


> On 2019-12-07, at 8:12 AM, Tobias Pape <[hidden email]> wrote:
>
>
>> On 07.12.2019, at 14:36, Thiede, Christoph <[hidden email]> wrote:
>>
>> It would be great if the Trunk image would contain more sizes of this font by default, perhaps 1 to: 72 by: 1
>> ...
>
> If only "that" wouldn't take up so much money

I suspect you intended to type 'memory' here, but perhaps you were indeed concerned about licensing; some fonts are certainly very license/cost encumbered.
>
>>
>> Or could you maybe provide a dense set of generated PNGs in the release section of your repo? For all the people who don't have a mac :-)
>
> Err. I am unsure whether the licenses permit that and I have no time to check.

There are a good number of free outline fonts available. I mentioned one source a week or three ago - fonts.google.com

Probably the best trick would be to make it easier to locate/load/process/use such fonts in normal usage. We can read TTF files pretty well (not sure if we handle all the skeleton hinting etc) and produce font glyphs at specific sizes. Caching them efficiently shouldn't be beyond the skills of such an impressive bunch of programmers. We could save the glyph data out as image segments in much the same way that we cache local MC files. Waaaaaay back in the last millennium we (as in 'exobox') did that and loading the glyphs for maybe 50 fonts/sizes from image segments took a small fraction of a second on the cheapest x86 machines of the era. Even waaaaay-er (is that word? It is now) back in time Acorn did a related thing for high quality fonts for RISC OS; render the glyphs as needed on a per-character basis, and render them separately for sub-pixle positioning. We could easily manage quarter-pixel positioning that way - remember, the Acorn machines had at max 4mb ram. we have code in the image already to do sub-pixle rendering, or at least the preferences to select it!


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Artificial Intelligence:  Making computers behave like they do in the movies.



Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti
Evviva, habemus improvement in font ! 

What I tried is this:

0] Some tiny tweaks on @Tobias code.

1] Add new sizes to DejaVu Sans 
=> Failure. See attachment in next mail (must be < 2M limit)

2] Add font Roboto, size 11 works and it fits my eyes, it is quite nice to see as well. 
=> Working, see attachment 1.

3] Add font RobotoMono, size 9 works and it fits my eyes, it is not nice to see as Roboto but readability is wunderbar IMO.
=> Working, see attachment 2.

====== Extra considerations ======

E1] It took me all the afternoon to get some result. I could not make it if I did not know Python already and I hadn't a decent number of hours wrangling with Squeak under my belt. => Not for beginners. 

E2] This procedure is just for Mac. I agree with @Christoph, there should be a better way. I can try to pack Roboto and RobotoMono in a SqueakMap package, I never did one, but it seems a good occasion to try it out. I like SqueakMap, installing stuff is as easy as it should be:)

E3] Can you tell me why I can't generate all the sizes I wish? Where does the limitation come from? For RobotoMono I see some garbage in certain sizes eg: {12,10,7}. But these sizes exist in GoogleDocuments for the same font. 

E4] @Tim, either you know already well the font subject and you know where to start to touch in Squeak or it will be a problem. Before @Tobias code I was miserably stuck. No reference anywhere. In the venerable Blue and Purple book there is nothing about fonts (or I can't find it), not even in Guzdial books. There is a (master thesis?) from HPI, here: 
I red a little part of it, it is good for background info, but it does not enter into the deep technical implementation details. 
=> So, this would be very hard to attack for a Squeak newcomer.
 
bye
Nicola





==============






On Dec 7, 2019, at 11:19 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-07, at 8:12 AM, Tobias Pape <[hidden email]> wrote:


On 07.12.2019, at 14:36, Thiede, Christoph <[hidden email]> wrote:

It would be great if the Trunk image would contain more sizes of this font by default, perhaps 1 to: 72 by: 1
...

If only "that" wouldn't take up so much money

I suspect you intended to type 'memory' here, but perhaps you were indeed concerned about licensing; some fonts are certainly very license/cost encumbered.


Or could you maybe provide a dense set of generated PNGs in the release section of your repo? For all the people who don't have a mac :-)

Err. I am unsure whether the licenses permit that and I have no time to check.

There are a good number of free outline fonts available. I mentioned one source a week or three ago - fonts.google.com

Probably the best trick would be to make it easier to locate/load/process/use such fonts in normal usage. We can read TTF files pretty well (not sure if we handle all the skeleton hinting etc) and produce font glyphs at specific sizes. Caching them efficiently shouldn't be beyond the skills of such an impressive bunch of programmers. We could save the glyph data out as image segments in much the same way that we cache local MC files. Waaaaaay back in the last millennium we (as in 'exobox') did that and loading the glyphs for maybe 50 fonts/sizes from image segments took a small fraction of a second on the cheapest x86 machines of the era. Even waaaaay-er (is that word? It is now) back in time Acorn did a related thing for high quality fonts for RISC OS; render the glyphs as needed on a per-character basis, and render them separately for sub-pixle positioning. We could easily manage quarter-pixel positioning that way - remember, the Acorn machines had at max 4mb ram. we have code in the image already to do sub-pixle rendering, or at least the preferences to select it!


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Artificial Intelligence:  Making computers behave like they do in the movies.






Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti
In reply to this post by timrowledge

follow up from previous email.

example of mangled font on certain size. 
This happens for several fonts/sizes.

bye
n.





On Dec 7, 2019, at 11:19 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-07, at 8:12 AM, Tobias Pape <[hidden email]> wrote:


On 07.12.2019, at 14:36, Thiede, Christoph <[hidden email]> wrote:

It would be great if the Trunk image would contain more sizes of this font by default, perhaps 1 to: 72 by: 1
...

If only "that" wouldn't take up so much money

I suspect you intended to type 'memory' here, but perhaps you were indeed concerned about licensing; some fonts are certainly very license/cost encumbered.


Or could you maybe provide a dense set of generated PNGs in the release section of your repo? For all the people who don't have a mac :-)

Err. I am unsure whether the licenses permit that and I have no time to check.

There are a good number of free outline fonts available. I mentioned one source a week or three ago - fonts.google.com

Probably the best trick would be to make it easier to locate/load/process/use such fonts in normal usage. We can read TTF files pretty well (not sure if we handle all the skeleton hinting etc) and produce font glyphs at specific sizes. Caching them efficiently shouldn't be beyond the skills of such an impressive bunch of programmers. We could save the glyph data out as image segments in much the same way that we cache local MC files. Waaaaaay back in the last millennium we (as in 'exobox') did that and loading the glyphs for maybe 50 fonts/sizes from image segments took a small fraction of a second on the cheapest x86 machines of the era. Even waaaaay-er (is that word? It is now) back in time Acorn did a related thing for high quality fonts for RISC OS; render the glyphs as needed on a per-character basis, and render them separately for sub-pixle positioning. We could easily manage quarter-pixel positioning that way - remember, the Acorn machines had at max 4mb ram. we have code in the image already to do sub-pixle rendering, or at least the preferences to select it!


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Artificial Intelligence:  Making computers behave like they do in the movies.






Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

timrowledge


> On 2019-12-07, at 11:29 PM, Nicola Mingotti <[hidden email]> wrote:
>
>
> follow up from previous email.
>
> example of mangled font on certain size.
> This happens for several fonts/sizes.

Ah, looks like you set it to use Elvish. Or possibly it's an endian problem; I've seen that sort of pattern when the endianness was swapped. Given that we know the code is doing the right thing normally, the first place I'd look is the original font data to see if it is bit-endian.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- One chip short of a cookie.



Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti

Hi Tim,

sorry, I see the email only now.

I would discard the Elvish hypothesis, will try to consider the endianness ;)

bye
Nicola




> On Dec 8, 2019, at 7:31 PM, tim Rowledge <[hidden email]> wrote:
>
>
>
>> On 2019-12-07, at 11:29 PM, Nicola Mingotti <[hidden email]> wrote:
>>
>>
>> follow up from previous email.
>>
>> example of mangled font on certain size.
>> This happens for several fonts/sizes.
>
> Ah, looks like you set it to use Elvish. Or possibly it's an endian problem; I've seen that sort of pattern when the endianness was swapped. Given that we know the code is doing the right thing normally, the first place I'd look is the original font data to see if it is bit-endian.
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Useful random insult:- One chip short of a cookie.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

timrowledge


> On 2019-12-22, at 3:09 PM, Nicola Mingotti <[hidden email]> wrote:
>
>
> Hi Tim,
>
> sorry, I see the email only now.
>
> I would discard the Elvish hypothesis, will try to consider the endianness ;)

That is by far the more likely hypothesis. Time to dig into the code that loads the font glyphs and maybe the file format specs?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple



Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti


I guess this task is still a bit too advanced for me.

I have new silly and more urgent problems to solve:

1] I restarted with a clean image, try to re-configure it as I like and in the meanwhile document how I am adding the Roboto Mono font. The problem is this time I see red boxes around the font :( [see attached image] 

2] When I press backspace many times instead of the expected behavior (cancel previous character) the Tool menu opens. I hate this deeply and I can't figure out where it comes from :( 

This happens only on the mac, never saw in the Linux release. 

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ] (I use that sequence to move from a desktop to another as: Ctrl+Ctrl+(Left|Right)Arrow) ).
-------------------- DockingBarMorph >> filterEvent: for: -------
"add after line: "
^ aKeyboardEvent ignore "hit!"].

"PART TO ADD "
     "Transcript show: 'keyValue: ', (aKeyboardEvent keyValue) asString; cr. "
     "If it is pressed Ctrl-Cmd, then discard the event."
     "Ctrl -> code: 59. Ctrl+Cmd -> code: 55. Ignore here when Ctrl+Cmd is pressed. " 
     aKeyboardEvent keyValue = 55 
ifTrue: [^ aKeyboardEvent].



bye
Nicola




On Dec 23, 2019, at 12:59 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-22, at 3:09 PM, Nicola Mingotti <[hidden email]> wrote:


Hi Tim,

sorry, I see the email only now.

I would discard the Elvish hypothesis, will try to consider the endianness ;)

That is by far the more likely hypothesis. Time to dig into the code that loads the font glyphs and maybe the file format specs?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple






Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti


Guys, 

The red box around the font which I have shown in the previous email disappears if I de-select the preference "Subpixel font rendering".

I have no idea why it works, but it works. (in macOS, Squeak 5.2)

bye
n.


On Dec 23, 2019, at 1:55 AM, Nicola Mingotti <[hidden email]> wrote:



I guess this task is still a bit too advanced for me.

I have new silly and more urgent problems to solve:

1] I restarted with a clean image, try to re-configure it as I like and in the meanwhile document how I am adding the Roboto Mono font. The problem is this time I see red boxes around the font :( [see attached image] 

2] When I press backspace many times instead of the expected behavior (cancel previous character) the Tool menu opens. I hate this deeply and I can't figure out where it comes from :( 

This happens only on the mac, never saw in the Linux release. 

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ] (I use that sequence to move from a desktop to another as: Ctrl+Ctrl+(Left|Right)Arrow) ).
-------------------- DockingBarMorph >> filterEvent: for: -------
"add after line: "
^ aKeyboardEvent ignore "hit!"].

"PART TO ADD "
     "Transcript show: 'keyValue: ', (aKeyboardEvent keyValue) asString; cr. "
     "If it is pressed Ctrl-Cmd, then discard the event."
     "Ctrl -> code: 59. Ctrl+Cmd -> code: 55. Ignore here when Ctrl+Cmd is pressed. " 
     aKeyboardEvent keyValue = 55 
ifTrue: [^ aKeyboardEvent].



bye
Nicola


<box-around-font.png>


On Dec 23, 2019, at 12:59 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-22, at 3:09 PM, Nicola Mingotti <[hidden email]> wrote:


Hi Tim,

sorry, I see the email only now.

I would discard the Elvish hypothesis, will try to consider the endianness ;)

That is by far the more likely hypothesis. Time to dig into the code that loads the font glyphs and maybe the file format specs?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple







Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

marcel.taeumel
In reply to this post by Nicola Mingotti
Hi Nicola :-)

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ]

Fixed in Morphic-mt.1612.

Best,
Marcel

Am 23.12.2019 01:55:49 schrieb Nicola Mingotti <[hidden email]>:



I guess this task is still a bit too advanced for me.

I have new silly and more urgent problems to solve:

1] I restarted with a clean image, try to re-configure it as I like and in the meanwhile document how I am adding the Roboto Mono font. The problem is this time I see red boxes around the font :( [see attached image] 

2] When I press backspace many times instead of the expected behavior (cancel previous character) the Tool menu opens. I hate this deeply and I can't figure out where it comes from :( 

This happens only on the mac, never saw in the Linux release. 

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ] (I use that sequence to move from a desktop to another as: Ctrl+Ctrl+(Left|Right)Arrow) ).
-------------------- DockingBarMorph >> filterEvent: for: -------
"add after line: "
^ aKeyboardEvent ignore "hit!"].

"PART TO ADD "
     "Transcript show: 'keyValue: ', (aKeyboardEvent keyValue) asString; cr. "
     "If it is pressed Ctrl-Cmd, then discard the event."
     "Ctrl -> code: 59. Ctrl+Cmd -> code: 55. Ignore here when Ctrl+Cmd is pressed. " 
     aKeyboardEvent keyValue = 55 
ifTrue: [^ aKeyboardEvent].



bye
Nicola




On Dec 23, 2019, at 12:59 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-22, at 3:09 PM, Nicola Mingotti <[hidden email]> wrote:


Hi Tim,

sorry, I see the email only now.

I would discard the Elvish hypothesis, will try to consider the endianness ;)

That is by far the more likely hypothesis. Time to dig into the code that loads the font glyphs and maybe the file format specs?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple






Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti

Hi Marcel, 

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ]

Fixed in Morphic-mt.1612.


thank you, than this is going to be my first (indirect) contribution to Squeak :)

bye
nicola



Am 23.12.2019 01:55:49 schrieb Nicola Mingotti <[hidden email]>:



I guess this task is still a bit too advanced for me.

I have new silly and more urgent problems to solve:

1] I restarted with a clean image, try to re-configure it as I like and in the meanwhile document how I am adding the Roboto Mono font. The problem is this time I see red boxes around the font :( [see attached image] 

2] When I press backspace many times instead of the expected behavior (cancel previous character) the Tool menu opens. I hate this deeply and I can't figure out where it comes from :( 

This happens only on the mac, never saw in the Linux release. 

till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ] (I use that sequence to move from a desktop to another as: Ctrl+Ctrl+(Left|Right)Arrow) ).
-------------------- DockingBarMorph >> filterEvent: for: -------
"add after line: "
^ aKeyboardEvent ignore "hit!"].

"PART TO ADD "
     "Transcript show: 'keyValue: ', (aKeyboardEvent keyValue) asString; cr. "
     "If it is pressed Ctrl-Cmd, then discard the event."
     "Ctrl -> code: 59. Ctrl+Cmd -> code: 55. Ignore here when Ctrl+Cmd is pressed. " 
     aKeyboardEvent keyValue = 55 
ifTrue: [^ aKeyboardEvent].



bye
Nicola




On Dec 23, 2019, at 12:59 AM, tim Rowledge <[hidden email]> wrote:



On 2019-12-22, at 3:09 PM, Nicola Mingotti <[hidden email]> wrote:


Hi Tim,

sorry, I see the email only now.

I would discard the Elvish hypothesis, will try to consider the endianness ;)

That is by far the more likely hypothesis. Time to dig into the code that loads the font glyphs and maybe the file format specs?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple








Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

David T. Lewis
On Mon, Dec 23, 2019 at 02:40:08PM +0100, Nicola Mingotti wrote:

>
> Hi Marcel,
>
> > > till now the only modification I made to the shortcuts was the following; to prevent Ctrl-Cmd to open unwanted windows [e.g. Tools ]
> >
> > Fixed in Morphic-mt.1612.
> >
>
> thank you, than this is going to be my first (indirect) contribution to Squeak :)
>
> bye
> nicola
>

Looking forward to many more :-)

Dave


Reply | Threaded
Open this post in threaded view
|

Re: [Newbies] What font do you use in macOS ?

Nicola Mingotti


On Dec 23, 2019, at 3:51 PM, David T. Lewis <[hidden email]> wrote:

Looking forward to many more :-)

Dave

Thumb up :)

n.