Freezing Bloc UI

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

Freezing Bloc UI

Peter Uhnak
Hi,

when reloading FreeType (Settings > Use free type:)

and then trying to change the font (Standard Fonts >> default)
some inputs are not drawn and the UI freezes completely.



Interestingly if I press alt+<dot> the UI doesn't respond, but the Image clearly does because there is output in the command line:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
​User Interrupt
[ delaySemaphore wait ] in Delay>>wait in Block: [ delaySemaphore wait ]
BlockClosure>>ifCurtailed:
Delay>>wait
BlMainLoopManager>>interCyclePause:
BlMainLoopManager>>doOneCycle
self doOneCycle.
Processor yield ] in [ 
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
BlockClosure>>repeat
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ ...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

stepharo
thanks for looking at it.
Bloc needs feedback


Le 5/7/15 12:16, Peter Uhnák a écrit :
Hi,

when reloading FreeType (Settings > Use free type:)

and then trying to change the font (Standard Fonts >> default)
some inputs are not drawn and the UI freezes completely.



Interestingly if I press alt+<dot> the UI doesn't respond, but the Image clearly does because there is output in the command line:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
​User Interrupt
[ delaySemaphore wait ] in Delay>>wait in Block: [ delaySemaphore wait ]
BlockClosure>>ifCurtailed:
Delay>>wait
BlMainLoopManager>>interCyclePause:
BlMainLoopManager>>doOneCycle
self doOneCycle.
Processor yield ] in [ 
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
BlockClosure>>repeat
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ ...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Pharo Smalltalk Developers mailing list
Hello,

Thanks for experimenting Bloc!!!.

I think that, In this case, this is the font chooser that freezes, not Bloc.
You can always come back to Morphic with CMD+Backspace.
Then remove the freeze block space,  create a new bloc space and switch to it.

I guess it is because current standard fonts are strike fonts.
Try by selecting source code fonts first,
as a consequence default fonts are set to FT fonts.
Then open the font chooser. it should be ok.

Because of Athens and of TxText, no effort was made to make strike font usable with Bloc.
Now, I don’t know exactly why the font choose behaves like that.

Cheers
Alain

> On 05 Jul 2015, at 12:37, stepharo <[hidden email]> wrote:
>
> thanks for looking at it.
> Bloc needs feedback
>
>
> Le 5/7/15 12:16, Peter Uhnák a écrit :
>> Hi,
>>
>> when reloading FreeType (Settings > Use free type:)
>>
>> and then trying to change the font (Standard Fonts >> default)
>> some inputs are not drawn and the UI freezes completely.
>>
>> <Mail Attachment.png>
>>
>> Interestingly if I press alt+<dot> the UI doesn't respond, but the Image clearly does because there is output in the command line:
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ​User Interrupt
>> [ delaySemaphore wait ] in Delay>>wait in Block: [ delaySemaphore wait ]
>> BlockClosure>>ifCurtailed:
>> Delay>>wait
>> BlMainLoopManager>>interCyclePause:
>> BlMainLoopManager>>doOneCycle
>> [
>> self doOneCycle.
>> Processor yield ] in [
>> [
>> self doOneCycle.
>> Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
>> BlockClosure>>repeat
>> [
>> [
>> self doOneCycle.
>> Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
>> [
>> self value.
>> Processor terminateActive ] in BlockClosure>>newProcess in Block: [ ...
>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Peter
>


Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Nicolai Hess
In reply to this post by Peter Uhnak


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

 

and then trying to change the font (Standard Fonts >> default)
some inputs are not drawn and the UI freezes completely.



Interestingly if I press alt+<dot> the UI doesn't respond, but the Image clearly does because there is output in the command line:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
​User Interrupt
[ delaySemaphore wait ] in Delay>>wait in Block: [ delaySemaphore wait ]
BlockClosure>>ifCurtailed:
Delay>>wait
BlMainLoopManager>>interCyclePause:
BlMainLoopManager>>doOneCycle
self doOneCycle.
Processor yield ] in [ 
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
BlockClosure>>repeat
self doOneCycle.
Processor yield ] repeat ] in BlMainLoopManager>>loop in Block: [ ...
self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ ...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Nicolai Hess


2015-07-05 17:33 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

@peter
Did you try it, does it work for you ?
 

Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Peter Uhnak
Sorry it felt under radar...

yes, this does work!

however I managed to encounter two more bugs along the way

Pharo space: everything is underlined/bold as expected

Bloc space: no styling (this is same behavior both before and after loading Free Type)

​​

And second thing (that may not be so obvious from the screenshot) is jaggedness of the font in Bloc (that's why I was messing with fonts in the first place).

I suspected that Font Hinting (Settings > Appearance > Use Free Type ... > Advanced Features > Hinting) was incorrectly configured,
however when I tried to change it it had no effect.

So my conclusion that fonts are not yet fully implemented or something else is missing? Or is my system/configuration wrong? (The image is Bloc build #609 from pharo-contribution).
I actually have the very same problem in text rendered in Roassal (Athens canvas), so I blame Athens. Is there a solution for this?

Thanks,
Peter

On Mon, Jul 27, 2015 at 8:20 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-05 17:33 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

@peter
Did you try it, does it work for you ?
 


Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Nicolai Hess


2015-07-28 0:17 GMT+02:00 Peter Uhnák <[hidden email]>:
Sorry it felt under radar...

yes, this does work!

however I managed to encounter two more bugs along the way

Pharo space: everything is underlined/bold as expected

Yes, I know this one. It is because there are different ways how textemphasis is handled.
In a text teditor for example, we use the full Text object. And in a list view it is only the
first character/text that defines the emphasis for the whole text line. I ported only the first one yet for athens.

 

Bloc space: no styling (this is same behavior both before and after loading Free Type)

​​

And second thing (that may not be so obvious from the screenshot) is jaggedness of the font in Bloc (that's why I was messing with fonts in the first place).

Yes, small fonts look ugly with athens/cairo font rendering. This looks a little bit better if we enable/change the subpixel filter for FT and cairo (there is a bug
report at fogbugz, but I don't know if we will do this ever or if it is possible at all.
 

I suspected that Font Hinting (Settings > Appearance > Use Free Type ... > Advanced Features > Hinting) was incorrectly configured,
however when I tried to change it it had no effect.

This settings only control the options for the FreeTypePlugin used in Morphic. Athens/Cairo uses a different way for rending (cairo uses freetype too, but
the "normal" pharo freetypeplugin and cairo are using freetype differently ).
But you can control Cairos font options too (Look at class CairoFontOptions).
 

So my conclusion that fonts are not yet fully implemented or something else is missing? Or is my system/configuration wrong? (The image is Bloc build #609 from pharo-contribution).
I actually have the very same problem in text rendered in Roassal (Athens canvas), so I blame Athens. Is there a solution for this?

Yes, this is all about athens resp. athens cairo backend.
 

Thanks,
Peter

On Mon, Jul 27, 2015 at 8:20 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-05 17:33 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

@peter
Did you try it, does it work for you ?
 



Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

abergel
Thanks for looking at this. This is highly important.  

Alexandre 



Le 27 juil. 2015 à 19:55, Nicolai Hess <[hidden email]> a écrit :



2015-07-28 0:17 GMT+02:00 Peter Uhnák <[hidden email]>:
Sorry it felt under radar...

yes, this does work!

however I managed to encounter two more bugs along the way

Pharo space: everything is underlined/bold as expected

Yes, I know this one. It is because there are different ways how textemphasis is handled.
In a text teditor for example, we use the full Text object. And in a list view it is only the
first character/text that defines the emphasis for the whole text line. I ported only the first one yet for athens.

 
<2015-07-28_00:03:48.png>

Bloc space: no styling (this is same behavior both before and after loading Free Type)
<2015-07-28_00:04:02.png>
​​

And second thing (that may not be so obvious from the screenshot) is jaggedness of the font in Bloc (that's why I was messing with fonts in the first place).

Yes, small fonts look ugly with athens/cairo font rendering. This looks a little bit better if we enable/change the subpixel filter for FT and cairo (there is a bug
report at fogbugz, but I don't know if we will do this ever or if it is possible at all.
 

I suspected that Font Hinting (Settings > Appearance > Use Free Type ... > Advanced Features > Hinting) was incorrectly configured,
however when I tried to change it it had no effect.

This settings only control the options for the FreeTypePlugin used in Morphic. Athens/Cairo uses a different way for rending (cairo uses freetype too, but
the "normal" pharo freetypeplugin and cairo are using freetype differently ).
But you can control Cairos font options too (Look at class CairoFontOptions).
 

So my conclusion that fonts are not yet fully implemented or something else is missing? Or is my system/configuration wrong? (The image is Bloc build #609 from pharo-contribution).
I actually have the very same problem in text rendered in Roassal (Athens canvas), so I blame Athens. Is there a solution for this?

Yes, this is all about athens resp. athens cairo backend.
 

Thanks,
Peter

On Mon, Jul 27, 2015 at 8:20 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-05 17:33 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

@peter
Did you try it, does it work for you ?
 




2015-07-28_00:03:48.png (123K) Download Attachment
2015-07-28_00:04:02.png (78K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Peter Uhnak
In reply to this post by Nicolai Hess
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Peter Uhnak
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Nicolai Hess


2015-07-28 20:51 GMT+02:00 Peter Uhnák <[hidden email]>:
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Can you show an example.
with some info about:
what platform
cairo version
the font
 

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Yes, Athens is the API and cairo is the backend. All rendering happens through cairo (and freetype).
 

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter


Reply | Threaded
Open this post in threaded view
|

Fwd: Freezing Bloc UI

Peter Uhnak
... I should really stop clicking <Reply> instead of <Reply to all>.... sorry for the double mails Nicolai.


Platform - Debian Linux 64 bit (mix of stable/testing/experimental)
Font - DejaVu Sans Regular 10 (I wanted to use Source Sans Pro, but my system is behaving weirdly about this font, so I used DejaVu, but in principle its same)
libcairo2 1.14.2-2


Morphic is screen from Morphic world (with hinting on normal)
Pango/Cairo generated with this script http://pastebin.com/Fx0r4XWJ (I found the code in this discussion http://ubuntuforums.org/archive/index.php/t-2120175.html )
Bloc is from Bloc world.

Apart from antialiasing, in ​the Bloc one you can also see that kerning is wrong; noticeable for example in q-uic-k, br-o-wn, l-azy or Config-uration.

Peter

On Tue, Jul 28, 2015 at 11:36 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-28 20:51 GMT+02:00 Peter Uhnák <[hidden email]>:
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Can you show an example.
with some info about:
what platform
cairo version
the font
 

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Yes, Athens is the API and cairo is the backend. All rendering happens through cairo (and freetype).
 

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter




Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Freezing Bloc UI

Nicolai Hess


2015-07-29 9:14 GMT+02:00 Peter Uhnák <[hidden email]>:
... I should really stop clicking <Reply> instead of <Reply to all>.... sorry for the double mails Nicolai.


Platform - Debian Linux 64 bit (mix of stable/testing/experimental)
Font - DejaVu Sans Regular 10 (I wanted to use Source Sans Pro, but my system is behaving weirdly about this font, so I used DejaVu, but in principle its same)
libcairo2 1.14.2-2


Morphic is screen from Morphic world (with hinting on normal)
Pango/Cairo generated with this script http://pastebin.com/Fx0r4XWJ (I found the code in this discussion http://ubuntuforums.org/archive/index.php/t-2120175.html )
Bloc is from Bloc world.

Apart from antialiasing, in ​the Bloc one you can also see that kerning is wrong; noticeable for example in q-uic-k, br-o-wn, l-azy or Config-uration.

I don't think it uses different kerning. If you enlarge the image, it looks like the characters cover the same pixel but with
different colors. And this appears as different thickness and distance.

 

Peter

On Tue, Jul 28, 2015 at 11:36 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-28 20:51 GMT+02:00 Peter Uhnák <[hidden email]>:
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Can you show an example.
with some info about:
what platform
cairo version
the font
 

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Yes, Athens is the API and cairo is the backend. All rendering happens through cairo (and freetype).
 

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter





Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Freezing Bloc UI

Peter Uhnak
I'm not sure I understand... I mean the top two are objectively better, no?
Whether they cover same pixels but with different colors seems irrelevant since if the eyes see it differently.

My understanding was that it was not possible to achieve better result with Athens/Cairo than currently is and Pango/Cairo seems to produce better result.

What am I missing?

Thanks,
Peter

On Thu, Jul 30, 2015 at 9:55 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-29 9:14 GMT+02:00 Peter Uhnák <[hidden email]>:
... I should really stop clicking <Reply> instead of <Reply to all>.... sorry for the double mails Nicolai.


Platform - Debian Linux 64 bit (mix of stable/testing/experimental)
Font - DejaVu Sans Regular 10 (I wanted to use Source Sans Pro, but my system is behaving weirdly about this font, so I used DejaVu, but in principle its same)
libcairo2 1.14.2-2


Morphic is screen from Morphic world (with hinting on normal)
Pango/Cairo generated with this script http://pastebin.com/Fx0r4XWJ (I found the code in this discussion http://ubuntuforums.org/archive/index.php/t-2120175.html )
Bloc is from Bloc world.

Apart from antialiasing, in ​the Bloc one you can also see that kerning is wrong; noticeable for example in q-uic-k, br-o-wn, l-azy or Config-uration.

I don't think it uses different kerning. If you enlarge the image, it looks like the characters cover the same pixel but with
different colors. And this appears as different thickness and distance.

 

Peter

On Tue, Jul 28, 2015 at 11:36 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-28 20:51 GMT+02:00 Peter Uhnák <[hidden email]>:
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Can you show an example.
with some info about:
what platform
cairo version
the font
 

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Yes, Athens is the API and cairo is the backend. All rendering happens through cairo (and freetype).
 

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter






Reply | Threaded
Open this post in threaded view
|

Re: Freezing Bloc UI

Nicolai Hess
In reply to this post by Peter Uhnak
I made a new configuration with this fix, and drawing bold/underline for list elements
load new athens version 3.7


2015-07-28 0:17 GMT+02:00 Peter Uhnák <[hidden email]>:
Sorry it felt under radar...

yes, this does work!

however I managed to encounter two more bugs along the way

Pharo space: everything is underlined/bold as expected

Bloc space: no styling (this is same behavior both before and after loading Free Type)

​​

And second thing (that may not be so obvious from the screenshot) is jaggedness of the font in Bloc (that's why I was messing with fonts in the first place).

I suspected that Font Hinting (Settings > Appearance > Use Free Type ... > Advanced Features > Hinting) was incorrectly configured,
however when I tried to change it it had no effect.

So my conclusion that fonts are not yet fully implemented or something else is missing? Or is my system/configuration wrong? (The image is Bloc build #609 from pharo-contribution).
I actually have the very same problem in text rendered in Roassal (Athens canvas), so I blame Athens. Is there a solution for this?

Thanks,
Peter

On Mon, Jul 27, 2015 at 8:20 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-05 17:33 GMT+02:00 Nicolai Hess <[hidden email]>:


2015-07-05 12:16 GMT+02:00 Peter Uhnák <[hidden email]>:
Hi,

when reloading FreeType (Settings > Use free type:)

This is an Athens issues. Athens only "officially" supports vector fonts.
Drawing with bitmap fonts is a hack (and that happens during disable/enable freetype).

fixed in athens repository:

Name: Athens-Cairo-NicolaiHess.89
Author: NicolaiHess
Time: 5 July 2015, 5:31:21.319671 pm
UUID: f2a202d8-67fb-984c-a75a-21820d8fa9d4
Ancestors: Athens-Cairo-Nicolaihess.88
convert text string to utf8 converted buffer for
cairos cairo_show_text method

@peter
Did you try it, does it work for you ?
 



Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Freezing Bloc UI

Nicolai Hess
In reply to this post by Peter Uhnak


2015-07-30 23:31 GMT+02:00 Peter Uhnák <[hidden email]>:
I'm not sure I understand... I mean the top two are objectively better, no?

Yes
 
Whether they cover same pixels but with different colors seems irrelevant since if the eyes see it differently.

Sure, I just wanted to say, that the different colors may be the cause why the characters appear with different gaps between.
 

My understanding was that it was not possible to achieve better result with Athens/Cairo than currently is and Pango/Cairo seems to produce better result.

There are some options for cairo to control the rendering (antialiasing / hinting ..) and some other options for freetype.
You can play with these options and look if the result looks better.
For exampe, if you enable the hintMetrics, the rendering result looks almost like your pango/cairo example.
But the characters looks like they are squeezed (vertical direction). And if you disable the LoadNoHint/NoAutoHinting, the result looks (I think) exactly like th
pango example.

But I don't know if this are the correct settings. Whoever wrote this functions may had a reason to choose this setting.

(if you want to play with these options, you have to flush Athens/Cairos cache.

For example:

change CairoFontOptions>>#setDefaults to enable hintMetrics
remove LoadNoHinting and LoadNoAutohint loadflags in CairoFontFace class>>#fromFreetypeFace:
call CairoBackendCache flush.


 

What am I missing?

Thanks,
Peter

On Thu, Jul 30, 2015 at 9:55 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-29 9:14 GMT+02:00 Peter Uhnák <[hidden email]>:
... I should really stop clicking <Reply> instead of <Reply to all>.... sorry for the double mails Nicolai.


Platform - Debian Linux 64 bit (mix of stable/testing/experimental)
Font - DejaVu Sans Regular 10 (I wanted to use Source Sans Pro, but my system is behaving weirdly about this font, so I used DejaVu, but in principle its same)
libcairo2 1.14.2-2


Morphic is screen from Morphic world (with hinting on normal)
Pango/Cairo generated with this script http://pastebin.com/Fx0r4XWJ (I found the code in this discussion http://ubuntuforums.org/archive/index.php/t-2120175.html )
Bloc is from Bloc world.

Apart from antialiasing, in ​the Bloc one you can also see that kerning is wrong; noticeable for example in q-uic-k, br-o-wn, l-azy or Config-uration.

I don't think it uses different kerning. If you enlarge the image, it looks like the characters cover the same pixel but with
different colors. And this appears as different thickness and distance.

 

Peter

On Tue, Jul 28, 2015 at 11:36 PM, Nicolai Hess <[hidden email]> wrote:


2015-07-28 20:51 GMT+02:00 Peter Uhnák <[hidden email]>:
So apparently Firefox uses Pango on top of Cairo to render fonts. Is that something we can apply?
Because the results from pangocairo looks much better than what is currently in Bloc.

Can you show an example.
with some info about:
what platform
cairo version
the font
 

Or maybe I should be looking into Athens-based solution?
What is Athens thens? I thought that it's vector canvas, but that's what cairo is. Is athens just Smalltalk binding? Where is the line?

Yes, Athens is the API and cairo is the backend. All rendering happens through cairo (and freetype).
 

Thanks,
Peter

On Tue, Jul 28, 2015 at 8:47 PM, Peter Uhnák <[hidden email]> wrote:
but I don't know if we will do this ever or if it is possible at all.
 
 What do you mean not possible? That Bloc will have ugly jagged font without kerning?

I mean whole Firefox (Gecko) is rendered on Cairo, so surely the issue can't be in Cairo. So maybe we just need to implement/wrap/bridge something somewhere?

So if I want usable fonts I will need to start studying athens/cairo internals?

Peter