Enhanced StrikeFonts (antiAliasing , subPixel AA)

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

Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
From: Juan Vuletich <juan <at> jvuletich.org>
Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
Newsgroups: gmane.comp.lang.smalltalk.squeak.general
Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
Hi Folks,

If you update to the latest trunk, you'll load Graphics-jmv.53,
Morphic-jmv.138 and System-jmv.118. This is the support for anti aliased
StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9 is
set as default. I only included size 9 (reg, italic, bold, bold italic)
to avoid using too much space in the image. If people want, more sizes
can be added.

To do proper antialiasing / subpixel AA _without_ requiring new BitBlt
modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
Text looks very good, in any combination of font and background colors,
even at lower Display depths and / or glyphs depths.

By default underscore and caret are shown as in standard ASCII. If you
prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
useLeftArrow'. To go back to the default, evaluate 'StrikeFont
useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
#subPixelRenderColorFonts (both default to true).

Andreas, thanks for all your help!

Comments are welcome.

Cheers,
Juan Vuletich

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
Henrik

here is my answer: so I would really like to get enhanced strikefonts  
in pharo.
Now I would like to have the point of view of the font experts.

        http://code.google.com/p/pharo/issues/detail?id=1037


>> Hi Stef,
>>
>> Stéphane Ducasse wrote:
>>> Hi juan
>>>
>>> Ideally in Pharo I would really like to be able to have really  
>>> nice fonts without relying
>>> on external plugin. Now I do not know too much about fonts.
>>> Do you know that we could have the best of both worlds:
>>>    - your idea
>>>    - freetype.
>>>
>>> Stef
>>
>> Yes, I don't see any reason for not doing so. Load the attached.  
>> First 'preliminaries', then the big one.
>>
>> Enjoy!
>>
>> Cheers,
>> Juan Vuletich







On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:

> From: Juan Vuletich <juan <at> jvuletich.org>
> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
> Hi Folks,
>
> If you update to the latest trunk, you'll load Graphics-jmv.53,
> Morphic-jmv.138 and System-jmv.118. This is the support for anti  
> aliased
> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9 is
> set as default. I only included size 9 (reg, italic, bold, bold  
> italic)
> to avoid using too much space in the image. If people want, more sizes
> can be added.
>
> To do proper antialiasing / subpixel AA _without_ requiring new BitBlt
> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
> Text looks very good, in any combination of font and background  
> colors,
> even at lower Display depths and / or glyphs depths.
>
> By default underscore and caret are shown as in standard ASCII. If you
> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
> useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
> #subPixelRenderColorFonts (both default to true).
>
> Andreas, thanks for all your help!
>
> Comments are welcome.
>
> Cheers,
> Juan Vuletich
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

EnhancedStrikeFontsForPharo.zip (395K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
From: Andreas Raab <andreas.raab <at> gmx.de>
Subject: Morphic Text Improvements
Newsgroups: gmane.comp.lang.smalltalk.squeak.general
Date: 2009-08-05 07:17:29 GMT (56 minutes ago)
Folks -

With our pretty new fonts, I felt the need to include some of our older
text improvements and fixes. If you update from the trunk, you will
notice that:

a) Text now has a more regular blinking insertion point instead of the
virtually invisible something before.

b) Text displayed with a non-default style always uses the correct
default font; text copied and pasted between editors with different text
styles has no strange effects on the text size.

c) The line height of empty text is correct (for example in
FillInTheBlanks - this is much more noticable with blinking cursors).

I don't expect any fallout with these changes because they've been used
quite a while and are pretty solid, but since text behavior can
sometimes have odd side effects, please keep an eye open and let me know
if you find any strange behavior.

Enjoy,
    - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Adrian Lienhard
In reply to this post by Stéphane Ducasse
> Concerning the fonts, I wonder what the win is, now that we have  
> FreeType? Not that I don't like Juan's solution (I even proposed it  
> some time ago for Pharo but then others preferred FreeType). When  
> would FreeType not work and you would fall back to Juan's fonts?
>
> Adrian


On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:

> Henrik
>
> here is my answer: so I would really like to get enhanced  
> strikefonts in pharo.
> Now I would like to have the point of view of the font experts.
>
> http://code.google.com/p/pharo/issues/detail?id=1037
>
>
>>> Hi Stef,
>>>
>>> Stéphane Ducasse wrote:
>>>> Hi juan
>>>>
>>>> Ideally in Pharo I would really like to be able to have really  
>>>> nice fonts without relying
>>>> on external plugin. Now I do not know too much about fonts.
>>>> Do you know that we could have the best of both worlds:
>>>>   - your idea
>>>>   - freetype.
>>>>
>>>> Stef
>>>
>>> Yes, I don't see any reason for not doing so. Load the attached.  
>>> First 'preliminaries', then the big one.
>>>
>>> Enjoy!
>>>
>>> Cheers,
>>> Juan Vuletich
>
>
> <EnhancedStrikeFontsForPharo.zip>
>
>
>
>
> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>
>> From: Juan Vuletich <juan <at> jvuletich.org>
>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>> Hi Folks,
>>
>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>> Morphic-jmv.138 and System-jmv.118. This is the support for anti  
>> aliased
>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9 is
>> set as default. I only included size 9 (reg, italic, bold, bold  
>> italic)
>> to avoid using too much space in the image. If people want, more  
>> sizes
>> can be added.
>>
>> To do proper antialiasing / subpixel AA _without_ requiring new  
>> BitBlt
>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
>> Text looks very good, in any combination of font and background  
>> colors,
>> even at lower Display depths and / or glyphs depths.
>>
>> By default underscore and caret are shown as in standard ASCII. If  
>> you
>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
>> #subPixelRenderColorFonts (both default to true).
>>
>> Andreas, thanks for all your help!
>>
>> Comments are welcome.
>>
>> Cheers,
>> Juan Vuletich
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
I have the impression that in case you want to have to run your vm on  
system not having the freeType plugin.
Relying less on C code is a nice option (especially when a guy did all  
the work).
Often people are telling us that we should not do everything in  
Smalltalk but there this is a nice solution
and all in Smalltalk.

Stef


>> Concerning the fonts, I wonder what the win is, now that we have
>> FreeType? Not that I don't like Juan's solution (I even proposed it
>> some time ago for Pharo but then others preferred FreeType). When
>> would FreeType not work and you would fall back to Juan's fonts?
>>
>> Adrian
>
>
> On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>
>> Henrik
>>
>> here is my answer: so I would really like to get enhanced
>> strikefonts in pharo.
>> Now I would like to have the point of view of the font experts.
>>
>> http://code.google.com/p/pharo/issues/detail?id=1037
>>
>>
>>>> Hi Stef,
>>>>
>>>> Stéphane Ducasse wrote:
>>>>> Hi juan
>>>>>
>>>>> Ideally in Pharo I would really like to be able to have really
>>>>> nice fonts without relying
>>>>> on external plugin. Now I do not know too much about fonts.
>>>>> Do you know that we could have the best of both worlds:
>>>>>  - your idea
>>>>>  - freetype.
>>>>>
>>>>> Stef
>>>>
>>>> Yes, I don't see any reason for not doing so. Load the attached.
>>>> First 'preliminaries', then the big one.
>>>>
>>>> Enjoy!
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>
>>
>> <EnhancedStrikeFontsForPharo.zip>
>>
>>
>>
>>
>> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>>
>>> From: Juan Vuletich <juan <at> jvuletich.org>
>>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>>> Hi Folks,
>>>
>>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>>> aliased
>>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9  
>>> is
>>> set as default. I only included size 9 (reg, italic, bold, bold
>>> italic)
>>> to avoid using too much space in the image. If people want, more
>>> sizes
>>> can be added.
>>>
>>> To do proper antialiasing / subpixel AA _without_ requiring new
>>> BitBlt
>>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
>>> Text looks very good, in any combination of font and background
>>> colors,
>>> even at lower Display depths and / or glyphs depths.
>>>
>>> By default underscore and caret are shown as in standard ASCII. If
>>> you
>>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
>>> #subPixelRenderColorFonts (both default to true).
>>>
>>> Andreas, thanks for all your help!
>>>
>>> Comments are welcome.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Mariano Martinez Peck


On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]> wrote:
I have the impression that in case you want to have to run your vm on
system not having the freeType plugin.
Relying less on C code is a nice option (especially when a guy did all
the work).
Often people are telling us that we should not do everything in
Smalltalk but there this is a nice solution
and all in Smalltalk.

what about the performance between them?

If I can choose, I will obviously choose to do as much as possible in the smalltalk world. However, this is not always possible. If this Juan fonts were as fast (or better) as TrueTypes and as nice of them, I would choose Juan's work.

Another newbie question, with this StrikeFonts, can I choose the font to use?

thanks

mariano
 

Stef


>> Concerning the fonts, I wonder what the win is, now that we have
>> FreeType? Not that I don't like Juan's solution (I even proposed it
>> some time ago for Pharo but then others preferred FreeType). When
>> would FreeType not work and you would fall back to Juan's fonts?
>>
>> Adrian
>
>
> On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>
>> Henrik
>>
>> here is my answer: so I would really like to get enhanced
>> strikefonts in pharo.
>> Now I would like to have the point of view of the font experts.
>>
>>      http://code.google.com/p/pharo/issues/detail?id=1037
>>
>>
>>>> Hi Stef,
>>>>
>>>> Stéphane Ducasse wrote:
>>>>> Hi juan
>>>>>
>>>>> Ideally in Pharo I would really like to be able to have really
>>>>> nice fonts without relying
>>>>> on external plugin. Now I do not know too much about fonts.
>>>>> Do you know that we could have the best of both worlds:
>>>>>  - your idea
>>>>>  - freetype.
>>>>>
>>>>> Stef
>>>>
>>>> Yes, I don't see any reason for not doing so. Load the attached.
>>>> First 'preliminaries', then the big one.
>>>>
>>>> Enjoy!
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>
>>
>> <EnhancedStrikeFontsForPharo.zip>
>>
>>
>>
>>
>> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>>
>>> From: Juan Vuletich <juan <at> jvuletich.org>
>>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>>> Hi Folks,
>>>
>>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>>> aliased
>>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9
>>> is
>>> set as default. I only included size 9 (reg, italic, bold, bold
>>> italic)
>>> to avoid using too much space in the image. If people want, more
>>> sizes
>>> can be added.
>>>
>>> To do proper antialiasing / subpixel AA _without_ requiring new
>>> BitBlt
>>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
>>> Text looks very good, in any combination of font and background
>>> colors,
>>> even at lower Display depths and / or glyphs depths.
>>>
>>> By default underscore and caret are shown as in standard ASCII. If
>>> you
>>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
>>> #subPixelRenderColorFonts (both default to true).
>>>
>>> Andreas, thanks for all your help!
>>>
>>> Comments are welcome.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Henrik Sperre Johansen
AA-StrikeFont rendering is ALOT faster than TrueType rendering.

Plus, they allow a good way to get nice-looking fonts on all platforms without distributing a Font with the image.
You have to import new StrikeFonts manually into the image if you want more choice, only DejaVu in 7/9/12, with italic and bold variants are included in Juans changeset.
If you choose one of the truetype-fonts in your system, they will, (of course) use TT-rendering instead.

TrueType is somewhat better looking though, and the StrikeFonts still have some bugs:
- WarpBlt doesn't work in the .cs, fixed in Squeak trunk. (F.ex leads to the mini-images on the window bar not rendering).
- "Disabled" buttons using StrikeFonts draw strangely (Open Monticello Browser for an example).
- The Squeak trunk version has a messed up StrikeFont class >> dejaVuSansBold12Form. (Or it might be caused by the way I loaded into Pharo, by browsing the package and installing just the latest versions of StrikeFont and BitBlt, then running StrikeFont installDejaVu)

Cheers,
Henry

Some details:

Opening up a BetaDev-image (Properties browser and workspace open), and doing:
TimeProfileBrowser onBlock: [|test|  500 timesRepeat: [World fullRepaintNeeded; doOneCycle]]

reveals :
- TT:
39400ms total 
- 34278ms rendering
- 13396ms rendering fonts.
17015 inc gc's, 3271ms

then installing StrikeFonts changeset and reopening Workspace/PropertiesBrowser:
- (leaf nodes are cut of at 1%, so font rendering is probably a bit higher)
28556ms total
- 22445ms rendering
- 1623ms rendering fonts.
10593 inc gc's, 2068ms

On Aug 6, 2009, at 3:19 23PM, Mariano Martinez Peck wrote:



On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]> wrote:
I have the impression that in case you want to have to run your vm on
system not having the freeType plugin.
Relying less on C code is a nice option (especially when a guy did all
the work).
Often people are telling us that we should not do everything in
Smalltalk but there this is a nice solution
and all in Smalltalk.

what about the performance between them?

If I can choose, I will obviously choose to do as much as possible in the smalltalk world. However, this is not always possible. If this Juan fonts were as fast (or better) as TrueTypes and as nice of them, I would choose Juan's work.

Another newbie question, with this StrikeFonts, can I choose the font to use?

thanks

mariano
 

Stef


>> Concerning the fonts, I wonder what the win is, now that we have
>> FreeType? Not that I don't like Juan's solution (I even proposed it
>> some time ago for Pharo but then others preferred FreeType). When
>> would FreeType not work and you would fall back to Juan's fonts?
>>
>> Adrian
>
>
> On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>
>> Henrik
>>
>> here is my answer: so I would really like to get enhanced
>> strikefonts in pharo.
>> Now I would like to have the point of view of the font experts.
>>
>>      http://code.google.com/p/pharo/issues/detail?id=1037
>>
>>
>>>> Hi Stef,
>>>>
>>>> Stéphane Ducasse wrote:
>>>>> Hi juan
>>>>>
>>>>> Ideally in Pharo I would really like to be able to have really
>>>>> nice fonts without relying
>>>>> on external plugin. Now I do not know too much about fonts.
>>>>> Do you know that we could have the best of both worlds:
>>>>>  - your idea
>>>>>  - freetype.
>>>>>
>>>>> Stef
>>>>
>>>> Yes, I don't see any reason for not doing so. Load the attached.
>>>> First 'preliminaries', then the big one.
>>>>
>>>> Enjoy!
>>>>
>>>> Cheers,
>>>> Juan Vuletich
>>
>>
>> <EnhancedStrikeFontsForPharo.zip>
>>
>>
>>
>>
>> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>>
>>> From: Juan Vuletich <juan <at> jvuletich.org>
>>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>>> Hi Folks,
>>>
>>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>>> aliased
>>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point size 9
>>> is
>>> set as default. I only included size 9 (reg, italic, bold, bold
>>> italic)
>>> to avoid using too much space in the image. If people want, more
>>> sizes
>>> can be added.
>>>
>>> To do proper antialiasing / subpixel AA _without_ requiring new
>>> BitBlt
>>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd rule.
>>> Text looks very good, in any combination of font and background
>>> colors,
>>> even at lower Display depths and / or glyphs depths.
>>>
>>> By default underscore and caret are shown as in standard ASCII. If
>>> you
>>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts and
>>> #subPixelRenderColorFonts (both default to true).
>>>
>>> Andreas, thanks for all your help!
>>>
>>> Comments are welcome.
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
Thanks thanks thanks. Henrik this is cool that we get such an  
analysis. Do you have an idea of the memory usage too :)

Juan sent me that yesterday:
         The new version is at http://www.jvuletich.org/Squeak/Misc/EnhancedStrikeFontsForPharoV2.zip 
  and includes all the latest enhancements I did for Squeak and Cuis  
on this arena. Please use this one and discard the previous one.

But may be still missing some fixes he did.
I would vote for including them in 1.1.

Stef

On Aug 6, 2009, at 4:24 PM, Henrik Johansen wrote:

> AA-StrikeFont rendering is ALOT faster than TrueType rendering.
>
> Plus, they allow a good way to get nice-looking fonts on all  
> platforms without distributing a Font with the image.
> You have to import new StrikeFonts manually into the image if you  
> want more choice, only DejaVu in 7/9/12, with italic and bold  
> variants are included in Juans changeset.
> If you choose one of the truetype-fonts in your system, they will,  
> (of course) use TT-rendering instead.
>
> TrueType is somewhat better looking though, and the StrikeFonts  
> still have some bugs:
> - WarpBlt doesn't work in the .cs, fixed in Squeak trunk. (F.ex  
> leads to the mini-images on the window bar not rendering).
> - "Disabled" buttons using StrikeFonts draw strangely (Open  
> Monticello Browser for an example).
> - The Squeak trunk version has a messed up StrikeFont class >>  
> dejaVuSansBold12Form. (Or it might be caused by the way I loaded  
> into Pharo, by browsing the package and installing just the latest  
> versions of StrikeFont and BitBlt, then running StrikeFont  
> installDejaVu)
>
> Cheers,
> Henry
>
> Some details:
>
> Opening up a BetaDev-image (Properties browser and workspace open),  
> and doing:
> TimeProfileBrowser onBlock: [|test|  500 timesRepeat: [World  
> fullRepaintNeeded; doOneCycle]]
>
> reveals :
> - TT:
> 39400ms total
> - 34278ms rendering
> - 13396ms rendering fonts.
> - 17015 inc gc's, 3271ms
>
> then installing StrikeFonts changeset and reopening Workspace/
> PropertiesBrowser:
> - (leaf nodes are cut of at 1%, so font rendering is probably a bit  
> higher)
> 28556ms total
> - 22445ms rendering
> - 1623ms rendering fonts.
> - 10593 inc gc's, 2068ms
>
> On Aug 6, 2009, at 3:19 23PM, Mariano Martinez Peck wrote:
>
>>
>>
>> On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]
>> > wrote:
>> I have the impression that in case you want to have to run your vm on
>> system not having the freeType plugin.
>> Relying less on C code is a nice option (especially when a guy did  
>> all
>> the work).
>> Often people are telling us that we should not do everything in
>> Smalltalk but there this is a nice solution
>> and all in Smalltalk.
>>
>> what about the performance between them?
>>
>> If I can choose, I will obviously choose to do as much as possible  
>> in the smalltalk world. However, this is not always possible. If  
>> this Juan fonts were as fast (or better) as TrueTypes and as nice  
>> of them, I would choose Juan's work.
>>
>> Another newbie question, with this StrikeFonts, can I choose the  
>> font to use?
>>
>> thanks
>>
>> mariano
>>
>>
>> Stef
>>
>>
>> >> Concerning the fonts, I wonder what the win is, now that we have
>> >> FreeType? Not that I don't like Juan's solution (I even proposed  
>> it
>> >> some time ago for Pharo but then others preferred FreeType). When
>> >> would FreeType not work and you would fall back to Juan's fonts?
>> >>
>> >> Adrian
>> >
>> >
>> > On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>> >
>> >> Henrik
>> >>
>> >> here is my answer: so I would really like to get enhanced
>> >> strikefonts in pharo.
>> >> Now I would like to have the point of view of the font experts.
>> >>
>> >>      http://code.google.com/p/pharo/issues/detail?id=1037
>> >>
>> >>
>> >>>> Hi Stef,
>> >>>>
>> >>>> Stéphane Ducasse wrote:
>> >>>>> Hi juan
>> >>>>>
>> >>>>> Ideally in Pharo I would really like to be able to have really
>> >>>>> nice fonts without relying
>> >>>>> on external plugin. Now I do not know too much about fonts.
>> >>>>> Do you know that we could have the best of both worlds:
>> >>>>>  - your idea
>> >>>>>  - freetype.
>> >>>>>
>> >>>>> Stef
>> >>>>
>> >>>> Yes, I don't see any reason for not doing so. Load the attached.
>> >>>> First 'preliminaries', then the big one.
>> >>>>
>> >>>> Enjoy!
>> >>>>
>> >>>> Cheers,
>> >>>> Juan Vuletich
>> >>
>> >>
>> >> <EnhancedStrikeFontsForPharo.zip>
>> >>
>> >>
>> >>
>> >>
>> >> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>> >>
>> >>> From: Juan Vuletich <juan <at> jvuletich.org>
>> >>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>> >>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>> >>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>> >>> Hi Folks,
>> >>>
>> >>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>> >>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>> >>> aliased
>> >>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point  
>> size 9
>> >>> is
>> >>> set as default. I only included size 9 (reg, italic, bold, bold
>> >>> italic)
>> >>> to avoid using too much space in the image. If people want, more
>> >>> sizes
>> >>> can be added.
>> >>>
>> >>> To do proper antialiasing / subpixel AA _without_ requiring new
>> >>> BitBlt
>> >>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd  
>> rule.
>> >>> Text looks very good, in any combination of font and background
>> >>> colors,
>> >>> even at lower Display depths and / or glyphs depths.
>> >>>
>> >>> By default underscore and caret are shown as in standard ASCII.  
>> If
>> >>> you
>> >>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>> >>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>> >>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts  
>> and
>> >>> #subPixelRenderColorFonts (both default to true).
>> >>>
>> >>> Andreas, thanks for all your help!
>> >>>
>> >>> Comments are welcome.
>> >>>
>> >>> Cheers,
>> >>> Juan Vuletich
>> >>>
>> >>> _______________________________________________
>> >>> Pharo-project mailing list
>> >>> [hidden email]
>> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >>
>> >> _______________________________________________
>> >> Pharo-project mailing list
>> >> [hidden email]
>> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- 
>> project
>> >
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > [hidden email]
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse

Latest tweaks. http://www.jvuletich.org/Squeak/Misc/EnhancedStrikeFontsForPharoV3.zip
Thanks to juan

:)

On Aug 7, 2009, at 8:22 AM, Stéphane Ducasse wrote:

> Thanks thanks thanks. Henrik this is cool that we get such an
> analysis. Do you have an idea of the memory usage too :)
>
> Juan sent me that yesterday:
> The new version is at http://www.jvuletich.org/Squeak/Misc/EnhancedStrikeFontsForPharoV2.zip
>  and includes all the latest enhancements I did for Squeak and Cuis
> on this arena. Please use this one and discard the previous one.
>
> But may be still missing some fixes he did.
> I would vote for including them in 1.1.
>
> Stef
>
> On Aug 6, 2009, at 4:24 PM, Henrik Johansen wrote:
>
>> AA-StrikeFont rendering is ALOT faster than TrueType rendering.
>>
>> Plus, they allow a good way to get nice-looking fonts on all
>> platforms without distributing a Font with the image.
>> You have to import new StrikeFonts manually into the image if you
>> want more choice, only DejaVu in 7/9/12, with italic and bold
>> variants are included in Juans changeset.
>> If you choose one of the truetype-fonts in your system, they will,
>> (of course) use TT-rendering instead.
>>
>> TrueType is somewhat better looking though, and the StrikeFonts
>> still have some bugs:
>> - WarpBlt doesn't work in the .cs, fixed in Squeak trunk. (F.ex
>> leads to the mini-images on the window bar not rendering).
>> - "Disabled" buttons using StrikeFonts draw strangely (Open
>> Monticello Browser for an example).
>> - The Squeak trunk version has a messed up StrikeFont class >>
>> dejaVuSansBold12Form. (Or it might be caused by the way I loaded
>> into Pharo, by browsing the package and installing just the latest
>> versions of StrikeFont and BitBlt, then running StrikeFont
>> installDejaVu)
>>
>> Cheers,
>> Henry
>>
>> Some details:
>>
>> Opening up a BetaDev-image (Properties browser and workspace open),
>> and doing:
>> TimeProfileBrowser onBlock: [|test|  500 timesRepeat: [World
>> fullRepaintNeeded; doOneCycle]]
>>
>> reveals :
>> - TT:
>> 39400ms total
>> - 34278ms rendering
>> - 13396ms rendering fonts.
>> - 17015 inc gc's, 3271ms
>>
>> then installing StrikeFonts changeset and reopening Workspace/
>> PropertiesBrowser:
>> - (leaf nodes are cut of at 1%, so font rendering is probably a bit
>> higher)
>> 28556ms total
>> - 22445ms rendering
>> - 1623ms rendering fonts.
>> - 10593 inc gc's, 2068ms
>>
>> On Aug 6, 2009, at 3:19 23PM, Mariano Martinez Peck wrote:
>>
>>>
>>>
>>> On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]
>>>> wrote:
>>> I have the impression that in case you want to have to run your vm  
>>> on
>>> system not having the freeType plugin.
>>> Relying less on C code is a nice option (especially when a guy did
>>> all
>>> the work).
>>> Often people are telling us that we should not do everything in
>>> Smalltalk but there this is a nice solution
>>> and all in Smalltalk.
>>>
>>> what about the performance between them?
>>>
>>> If I can choose, I will obviously choose to do as much as possible
>>> in the smalltalk world. However, this is not always possible. If
>>> this Juan fonts were as fast (or better) as TrueTypes and as nice
>>> of them, I would choose Juan's work.
>>>
>>> Another newbie question, with this StrikeFonts, can I choose the
>>> font to use?
>>>
>>> thanks
>>>
>>> mariano
>>>
>>>
>>> Stef
>>>
>>>
>>>>> Concerning the fonts, I wonder what the win is, now that we have
>>>>> FreeType? Not that I don't like Juan's solution (I even proposed
>>> it
>>>>> some time ago for Pharo but then others preferred FreeType). When
>>>>> would FreeType not work and you would fall back to Juan's fonts?
>>>>>
>>>>> Adrian
>>>>
>>>>
>>>> On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>>>>
>>>>> Henrik
>>>>>
>>>>> here is my answer: so I would really like to get enhanced
>>>>> strikefonts in pharo.
>>>>> Now I would like to have the point of view of the font experts.
>>>>>
>>>>>     http://code.google.com/p/pharo/issues/detail?id=1037
>>>>>
>>>>>
>>>>>>> Hi Stef,
>>>>>>>
>>>>>>> Stéphane Ducasse wrote:
>>>>>>>> Hi juan
>>>>>>>>
>>>>>>>> Ideally in Pharo I would really like to be able to have really
>>>>>>>> nice fonts without relying
>>>>>>>> on external plugin. Now I do not know too much about fonts.
>>>>>>>> Do you know that we could have the best of both worlds:
>>>>>>>> - your idea
>>>>>>>> - freetype.
>>>>>>>>
>>>>>>>> Stef
>>>>>>>
>>>>>>> Yes, I don't see any reason for not doing so. Load the attached.
>>>>>>> First 'preliminaries', then the big one.
>>>>>>>
>>>>>>> Enjoy!
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Juan Vuletich
>>>>>
>>>>>
>>>>> <EnhancedStrikeFontsForPharo.zip>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>>>>>
>>>>>> From: Juan Vuletich <juan <at> jvuletich.org>
>>>>>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>>>>>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>>>>>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>>>>>> Hi Folks,
>>>>>>
>>>>>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>>>>>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>>>>>> aliased
>>>>>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point
>>> size 9
>>>>>> is
>>>>>> set as default. I only included size 9 (reg, italic, bold, bold
>>>>>> italic)
>>>>>> to avoid using too much space in the image. If people want, more
>>>>>> sizes
>>>>>> can be added.
>>>>>>
>>>>>> To do proper antialiasing / subpixel AA _without_ requiring new
>>>>>> BitBlt
>>>>>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd
>>> rule.
>>>>>> Text looks very good, in any combination of font and background
>>>>>> colors,
>>>>>> even at lower Display depths and / or glyphs depths.
>>>>>>
>>>>>> By default underscore and caret are shown as in standard ASCII.
>>> If
>>>>>> you
>>>>>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>>>>>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>>>>>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts
>>> and
>>>>>> #subPixelRenderColorFonts (both default to true).
>>>>>>
>>>>>> Andreas, thanks for all your help!
>>>>>>
>>>>>> Comments are welcome.
>>>>>>
>>>>>> Cheers,
>>>>>> Juan Vuletich
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> [hidden email]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-
>>> project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Miguel Cobá
In reply to this post by Stéphane Ducasse
El vie, 07-08-2009 a las 08:22 +0200, Stéphane Ducasse escribió:

> Thanks thanks thanks. Henrik this is cool that we get such an  
> analysis. Do you have an idea of the memory usage too :)
>
> Juan sent me that yesterday:
> The new version is at http://www.jvuletich.org/Squeak/Misc/EnhancedStrikeFontsForPharoV2.zip 
>   and includes all the latest enhancements I did for Squeak and Cuis  
> on this arena. Please use this one and discard the previous one.
>
> But may be still missing some fixes he did.
> I would vote for including them in 1.1.
>
I strongly vote for including on 1.0.

Pharo 1.0 should be as espectacular as possible. And, if Cuis and Squeak
already have it, Pharo will begin with a disadvantage.
If isn't that hard to include it, please, please, include it on 1.0.

Miguel Cobá

> Stef
>
> On Aug 6, 2009, at 4:24 PM, Henrik Johansen wrote:
>
> > AA-StrikeFont rendering is ALOT faster than TrueType rendering.
> >
> > Plus, they allow a good way to get nice-looking fonts on all  
> > platforms without distributing a Font with the image.
> > You have to import new StrikeFonts manually into the image if you  
> > want more choice, only DejaVu in 7/9/12, with italic and bold  
> > variants are included in Juans changeset.
> > If you choose one of the truetype-fonts in your system, they will,  
> > (of course) use TT-rendering instead.
> >
> > TrueType is somewhat better looking though, and the StrikeFonts  
> > still have some bugs:
> > - WarpBlt doesn't work in the .cs, fixed in Squeak trunk. (F.ex  
> > leads to the mini-images on the window bar not rendering).
> > - "Disabled" buttons using StrikeFonts draw strangely (Open  
> > Monticello Browser for an example).
> > - The Squeak trunk version has a messed up StrikeFont class >>  
> > dejaVuSansBold12Form. (Or it might be caused by the way I loaded  
> > into Pharo, by browsing the package and installing just the latest  
> > versions of StrikeFont and BitBlt, then running StrikeFont  
> > installDejaVu)
> >
> > Cheers,
> > Henry
> >
> > Some details:
> >
> > Opening up a BetaDev-image (Properties browser and workspace open),  
> > and doing:
> > TimeProfileBrowser onBlock: [|test|  500 timesRepeat: [World  
> > fullRepaintNeeded; doOneCycle]]
> >
> > reveals :
> > - TT:
> > 39400ms total
> > - 34278ms rendering
> > - 13396ms rendering fonts.
> > - 17015 inc gc's, 3271ms
> >
> > then installing StrikeFonts changeset and reopening Workspace/
> > PropertiesBrowser:
> > - (leaf nodes are cut of at 1%, so font rendering is probably a bit  
> > higher)
> > 28556ms total
> > - 22445ms rendering
> > - 1623ms rendering fonts.
> > - 10593 inc gc's, 2068ms
> >
> > On Aug 6, 2009, at 3:19 23PM, Mariano Martinez Peck wrote:
> >
> >>
> >>
> >> On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]
> >> > wrote:
> >> I have the impression that in case you want to have to run your vm on
> >> system not having the freeType plugin.
> >> Relying less on C code is a nice option (especially when a guy did  
> >> all
> >> the work).
> >> Often people are telling us that we should not do everything in
> >> Smalltalk but there this is a nice solution
> >> and all in Smalltalk.
> >>
> >> what about the performance between them?
> >>
> >> If I can choose, I will obviously choose to do as much as possible  
> >> in the smalltalk world. However, this is not always possible. If  
> >> this Juan fonts were as fast (or better) as TrueTypes and as nice  
> >> of them, I would choose Juan's work.
> >>
> >> Another newbie question, with this StrikeFonts, can I choose the  
> >> font to use?
> >>
> >> thanks
> >>
> >> mariano
> >>
> >>
> >> Stef
> >>
> >>
> >> >> Concerning the fonts, I wonder what the win is, now that we have
> >> >> FreeType? Not that I don't like Juan's solution (I even proposed  
> >> it
> >> >> some time ago for Pharo but then others preferred FreeType). When
> >> >> would FreeType not work and you would fall back to Juan's fonts?
> >> >>
> >> >> Adrian
> >> >
> >> >
> >> > On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
> >> >
> >> >> Henrik
> >> >>
> >> >> here is my answer: so I would really like to get enhanced
> >> >> strikefonts in pharo.
> >> >> Now I would like to have the point of view of the font experts.
> >> >>
> >> >>      http://code.google.com/p/pharo/issues/detail?id=1037
> >> >>
> >> >>
> >> >>>> Hi Stef,
> >> >>>>
> >> >>>> Stéphane Ducasse wrote:
> >> >>>>> Hi juan
> >> >>>>>
> >> >>>>> Ideally in Pharo I would really like to be able to have really
> >> >>>>> nice fonts without relying
> >> >>>>> on external plugin. Now I do not know too much about fonts.
> >> >>>>> Do you know that we could have the best of both worlds:
> >> >>>>>  - your idea
> >> >>>>>  - freetype.
> >> >>>>>
> >> >>>>> Stef
> >> >>>>
> >> >>>> Yes, I don't see any reason for not doing so. Load the attached.
> >> >>>> First 'preliminaries', then the big one.
> >> >>>>
> >> >>>> Enjoy!
> >> >>>>
> >> >>>> Cheers,
> >> >>>> Juan Vuletich
> >> >>
> >> >>
> >> >> <EnhancedStrikeFontsForPharo.zip>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
> >> >>
> >> >>> From: Juan Vuletich <juan <at> jvuletich.org>
> >> >>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
> >> >>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
> >> >>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
> >> >>> Hi Folks,
> >> >>>
> >> >>> If you update to the latest trunk, you'll load Graphics-jmv.53,
> >> >>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
> >> >>> aliased
> >> >>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point  
> >> size 9
> >> >>> is
> >> >>> set as default. I only included size 9 (reg, italic, bold, bold
> >> >>> italic)
> >> >>> to avoid using too much space in the image. If people want, more
> >> >>> sizes
> >> >>> can be added.
> >> >>>
> >> >>> To do proper antialiasing / subpixel AA _without_ requiring new
> >> >>> BitBlt
> >> >>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd  
> >> rule.
> >> >>> Text looks very good, in any combination of font and background
> >> >>> colors,
> >> >>> even at lower Display depths and / or glyphs depths.
> >> >>>
> >> >>> By default underscore and caret are shown as in standard ASCII.  
> >> If
> >> >>> you
> >> >>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
> >> >>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
> >> >>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts  
> >> and
> >> >>> #subPixelRenderColorFonts (both default to true).
> >> >>>
> >> >>> Andreas, thanks for all your help!
> >> >>>
> >> >>> Comments are welcome.
> >> >>>
> >> >>> Cheers,
> >> >>> Juan Vuletich
> >> >>>
> >> >>> _______________________________________________
> >> >>> Pharo-project mailing list
> >> >>> [hidden email]
> >> >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >> >>
> >> >> _______________________________________________
> >> >> Pharo-project mailing list
> >> >> [hidden email]
> >> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- 
> >> project
> >> >
> >> >
> >> > _______________________________________________
> >> > Pharo-project mailing list
> >> > [hidden email]
> >> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [hidden email]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >>
> >> _______________________________________________
> >> Pharo-project mailing list
> >> [hidden email]
> >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > [hidden email]
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Stéphane Ducasse
So for that people need to help:
        - test it
        - test it
        - and tell us.
        - check the code changes/conflicts...
stef

On Aug 7, 2009, at 8:32 AM, Miguel Enrique Cobá Martinez wrote:

> El vie, 07-08-2009 a las 08:22 +0200, Stéphane Ducasse escribió:
>> Thanks thanks thanks. Henrik this is cool that we get such an
>> analysis. Do you have an idea of the memory usage too :)
>>
>> Juan sent me that yesterday:
>> The new version is at http://www.jvuletich.org/Squeak/Misc/EnhancedStrikeFontsForPharoV2.zip
>>  and includes all the latest enhancements I did for Squeak and Cuis
>> on this arena. Please use this one and discard the previous one.
>>
>> But may be still missing some fixes he did.
>> I would vote for including them in 1.1.
>>
> I strongly vote for including on 1.0.
>
> Pharo 1.0 should be as espectacular as possible. And, if Cuis and  
> Squeak
> already have it, Pharo will begin with a disadvantage.
> If isn't that hard to include it, please, please, include it on 1.0.
>
> Miguel Cobá
>> Stef
>>
>> On Aug 6, 2009, at 4:24 PM, Henrik Johansen wrote:
>>
>>> AA-StrikeFont rendering is ALOT faster than TrueType rendering.
>>>
>>> Plus, they allow a good way to get nice-looking fonts on all
>>> platforms without distributing a Font with the image.
>>> You have to import new StrikeFonts manually into the image if you
>>> want more choice, only DejaVu in 7/9/12, with italic and bold
>>> variants are included in Juans changeset.
>>> If you choose one of the truetype-fonts in your system, they will,
>>> (of course) use TT-rendering instead.
>>>
>>> TrueType is somewhat better looking though, and the StrikeFonts
>>> still have some bugs:
>>> - WarpBlt doesn't work in the .cs, fixed in Squeak trunk. (F.ex
>>> leads to the mini-images on the window bar not rendering).
>>> - "Disabled" buttons using StrikeFonts draw strangely (Open
>>> Monticello Browser for an example).
>>> - The Squeak trunk version has a messed up StrikeFont class >>
>>> dejaVuSansBold12Form. (Or it might be caused by the way I loaded
>>> into Pharo, by browsing the package and installing just the latest
>>> versions of StrikeFont and BitBlt, then running StrikeFont
>>> installDejaVu)
>>>
>>> Cheers,
>>> Henry
>>>
>>> Some details:
>>>
>>> Opening up a BetaDev-image (Properties browser and workspace open),
>>> and doing:
>>> TimeProfileBrowser onBlock: [|test|  500 timesRepeat: [World
>>> fullRepaintNeeded; doOneCycle]]
>>>
>>> reveals :
>>> - TT:
>>> 39400ms total
>>> - 34278ms rendering
>>> - 13396ms rendering fonts.
>>> - 17015 inc gc's, 3271ms
>>>
>>> then installing StrikeFonts changeset and reopening Workspace/
>>> PropertiesBrowser:
>>> - (leaf nodes are cut of at 1%, so font rendering is probably a bit
>>> higher)
>>> 28556ms total
>>> - 22445ms rendering
>>> - 1623ms rendering fonts.
>>> - 10593 inc gc's, 2068ms
>>>
>>> On Aug 6, 2009, at 3:19 23PM, Mariano Martinez Peck wrote:
>>>
>>>>
>>>>
>>>> On Wed, Aug 5, 2009 at 7:28 AM, Stéphane Ducasse <[hidden email]
>>>>> wrote:
>>>> I have the impression that in case you want to have to run your  
>>>> vm on
>>>> system not having the freeType plugin.
>>>> Relying less on C code is a nice option (especially when a guy did
>>>> all
>>>> the work).
>>>> Often people are telling us that we should not do everything in
>>>> Smalltalk but there this is a nice solution
>>>> and all in Smalltalk.
>>>>
>>>> what about the performance between them?
>>>>
>>>> If I can choose, I will obviously choose to do as much as possible
>>>> in the smalltalk world. However, this is not always possible. If
>>>> this Juan fonts were as fast (or better) as TrueTypes and as nice
>>>> of them, I would choose Juan's work.
>>>>
>>>> Another newbie question, with this StrikeFonts, can I choose the
>>>> font to use?
>>>>
>>>> thanks
>>>>
>>>> mariano
>>>>
>>>>
>>>> Stef
>>>>
>>>>
>>>>>> Concerning the fonts, I wonder what the win is, now that we have
>>>>>> FreeType? Not that I don't like Juan's solution (I even proposed
>>>> it
>>>>>> some time ago for Pharo but then others preferred FreeType). When
>>>>>> would FreeType not work and you would fall back to Juan's fonts?
>>>>>>
>>>>>> Adrian
>>>>>
>>>>>
>>>>> On Aug 5, 2009, at 09:50 , Stéphane Ducasse wrote:
>>>>>
>>>>>> Henrik
>>>>>>
>>>>>> here is my answer: so I would really like to get enhanced
>>>>>> strikefonts in pharo.
>>>>>> Now I would like to have the point of view of the font experts.
>>>>>>
>>>>>>     http://code.google.com/p/pharo/issues/detail?id=1037
>>>>>>
>>>>>>
>>>>>>>> Hi Stef,
>>>>>>>>
>>>>>>>> Stéphane Ducasse wrote:
>>>>>>>>> Hi juan
>>>>>>>>>
>>>>>>>>> Ideally in Pharo I would really like to be able to have really
>>>>>>>>> nice fonts without relying
>>>>>>>>> on external plugin. Now I do not know too much about fonts.
>>>>>>>>> Do you know that we could have the best of both worlds:
>>>>>>>>> - your idea
>>>>>>>>> - freetype.
>>>>>>>>>
>>>>>>>>> Stef
>>>>>>>>
>>>>>>>> Yes, I don't see any reason for not doing so. Load the  
>>>>>>>> attached.
>>>>>>>> First 'preliminaries', then the big one.
>>>>>>>>
>>>>>>>> Enjoy!
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Juan Vuletich
>>>>>>
>>>>>>
>>>>>> <EnhancedStrikeFontsForPharo.zip>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Aug 4, 2009, at 8:05 PM, Stéphane Ducasse wrote:
>>>>>>
>>>>>>> From: Juan Vuletich <juan <at> jvuletich.org>
>>>>>>> Subject: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)
>>>>>>> Newsgroups: gmane.comp.lang.smalltalk.squeak.general
>>>>>>> Date: 2009-08-03 21:52:47 GMT (20 hours and 12 minutes ago)
>>>>>>> Hi Folks,
>>>>>>>
>>>>>>> If you update to the latest trunk, you'll load Graphics-jmv.53,
>>>>>>> Morphic-jmv.138 and System-jmv.118. This is the support for anti
>>>>>>> aliased
>>>>>>> StrikeFonts from Cuis. The new 'BitmapDejaVu' font of point
>>>> size 9
>>>>>>> is
>>>>>>> set as default. I only included size 9 (reg, italic, bold, bold
>>>>>>> italic)
>>>>>>> to avoid using too much space in the image. If people want, more
>>>>>>> sizes
>>>>>>> can be added.
>>>>>>>
>>>>>>> To do proper antialiasing / subpixel AA _without_ requiring new
>>>>>>> BitBlt
>>>>>>> modes, I use RGBMul BitBlt rule, and a second pass with RGBAdd
>>>> rule.
>>>>>>> Text looks very good, in any combination of font and background
>>>>>>> colors,
>>>>>>> even at lower Display depths and / or glyphs depths.
>>>>>>>
>>>>>>> By default underscore and caret are shown as in standard ASCII.
>>>> If
>>>>>>> you
>>>>>>> prefer the classic ST-80 left and up arrow, evaluate 'StrikeFont
>>>>>>> useLeftArrow'. To go back to the default, evaluate 'StrikeFont
>>>>>>> useUnderscore'. I also added 2 preferences #subPixelRenderFonts
>>>> and
>>>>>>> #subPixelRenderColorFonts (both default to true).
>>>>>>>
>>>>>>> Andreas, thanks for all your help!
>>>>>>>
>>>>>>> Comments are welcome.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Juan Vuletich
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Pharo-project mailing list
>>>>>>> [hidden email]
>>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pharo-project mailing list
>>>>>> [hidden email]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-
>>>> project
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- 
>>>>> project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced StrikeFonts (antiAliasing , subPixel AA)

Henrik Sperre Johansen
In reply to this post by Stéphane Ducasse

On Aug 7, 2009, at 8:22 12AM, Stéphane Ducasse wrote:

> Thanks thanks thanks. Henrik this is cool that we get such an
> analysis. Do you have an idea of the memory usage too :)
>
> Stef
>
> On Aug 6, 2009, at 4:24 PM, Henrik Johansen wrote:

Without a memory allocation profiler, anything becomes a(n educated,  
at best) guess.
Mine would be the glyph cache lookup code, where 95% of the  
"rendering" time is spent.
For _each_ character rendered a loopup is made in a 3-layer dictionary  
to find the glyph:
1. By font
        - hashed by font size, so if f.ex you're using 2 fonts of size9,  
you're practically guaranteed collisions...
2. By character code.
        - 99% of the time, this will be in ascii range, might be a good idea  
to use a special class with array access for values 32-255, and a dict  
lookup just for the rest
3 By color/subpixel-position...
        - Character widths are also stored here. (but color/subpixel position  
make up 98% of these lookups)
        - Hashed by color value + subPixelPosition << 32, so you're always  
doing LargeInteger comparisions for lookups. Yay.
        - The color value calculation goes red << 24 + green << 16 + blue <<  
8 + alpha, so does 4 LargeInt additions instead of 3 SmallInteger adds  
and 1 LargeInt. Yay.

Also, every time a cached glyphs is accesed, it is pushed to top of a  
LinkedList, the only thing I can see this LinkedList currently used  
for, is easy access to all the CacheItem instances when removing them  
all... The idea was probably to sometimes just remove the least used  
ones, but that's currently not done, as far as I can see.

So in conclusion, the cache strategy in FreeType could benefit from a  
major rethinking :)

Cheers,
Henry



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project