The Trunk: Graphics-mt.351.mcz

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

The Trunk: Graphics-mt.351.mcz

commits-2
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.351.mcz

==================== Summary ====================

Name: Graphics-mt.351
Author: mt
Time: 16 June 2016, 1:56:13.140696 pm
UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8
Ancestors: Graphics-lpc.350

Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore.

=============== Diff against Graphics-lpc.350 ===============

Item was changed:
  ----- Method: StrikeFont>>ascentKern (in category 'accessing') -----
  ascentKern
  "Return the kern delta for ascenders."
+
+ self depth > 1 ifTrue: [^ 0].
+
+ "Optimization for traditional 1-bit fonts."
+ ^ (emphasis allMask: 2)
+ ifFalse: [0]
+ ifTrue: [(self ascent-5+4)//4 max: 0]  "See makeItalicGlyphs"
- (emphasis noMask: 2) ifTrue: [^ 0].
- ^ (self ascent-5+4)//4 max: 0  "See makeItalicGlyphs"
 
  !

Item was changed:
  ----- Method: StrikeFont>>baseKern (in category 'accessing') -----
  baseKern
  "Return the base kern value to be used for all characters."
 
+ self depth > 1 ifTrue: [^ 0].
- | italic |
- italic := emphasis allMask: 2.
 
+ "Optimization for traditional 1-bit fonts."
+ ^ (emphasis allMask: 2)
+ ifFalse: [0]
+ ifTrue: [((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
+ + (((self ascent-5+4)//4 max: 0))]!
- glyphs depth > 1 ifTrue: [
- ^(italic or: [ pointSize < 9 ])
- ifTrue: [ 1 ]
- ifFalse: [ 0] ].
-
- italic ifFalse: [^ 0].
- ^ ((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
- + (((self ascent-5+4)//4 max: 0))!

Item was changed:
  ----- Method: StrikeFont>>descentKern (in category 'accessing') -----
  descentKern
  "Return the kern delta for descenders."
- (emphasis noMask: 2) ifTrue: [^ 0].
- ^ (self height-1-self ascent+4)//4 max: 0  "See makeItalicGlyphs"
 
+ self depth > 1 ifTrue: [^ 0].
+
+ "Optimization for traditional 1-bit fonts."
+ ^ (emphasis allMask: 2)
+ ifFalse: [0]
+ ifTrue: [(self height-1-self ascent+4)//4 max: 0]  "See makeItalicGlyphs"
+
  !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Graphics-mt.351.mcz

Levente Uzonyi
Hi Marcel,

I suppose this change has broken all StrikeFonts other than Bitmap DejaVu
Sans.

Levente

On Thu, 16 Jun 2016, [hidden email] wrote:

> Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
> http://source.squeak.org/trunk/Graphics-mt.351.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-mt.351
> Author: mt
> Time: 16 June 2016, 1:56:13.140696 pm
> UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8
> Ancestors: Graphics-lpc.350
>
> Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore.
>
> =============== Diff against Graphics-lpc.350 ===============
>
> Item was changed:
>  ----- Method: StrikeFont>>ascentKern (in category 'accessing') -----
>  ascentKern
>   "Return the kern delta for ascenders."
> +
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self ascent-5+4)//4 max: 0]  "See makeItalicGlyphs"
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self ascent-5+4)//4 max: 0  "See makeItalicGlyphs"
>
>  !
>
> Item was changed:
>  ----- Method: StrikeFont>>baseKern (in category 'accessing') -----
>  baseKern
>   "Return the base kern value to be used for all characters."
>
> + self depth > 1 ifTrue: [^ 0].
> - | italic |
> - italic := emphasis allMask: 2.
>
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> + + (((self ascent-5+4)//4 max: 0))]!
> - glyphs depth > 1 ifTrue: [
> - ^(italic or: [ pointSize < 9 ])
> - ifTrue: [ 1 ]
> - ifFalse: [ 0] ].
> -
> - italic ifFalse: [^ 0].
> - ^ ((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> - + (((self ascent-5+4)//4 max: 0))!
>
> Item was changed:
>  ----- Method: StrikeFont>>descentKern (in category 'accessing') -----
>  descentKern
>   "Return the kern delta for descenders."
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self height-1-self ascent+4)//4 max: 0  "See makeItalicGlyphs"
>
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self height-1-self ascent+4)//4 max: 0]  "See makeItalicGlyphs"
> +
>  !
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Graphics-mt.351.mcz

marcel.taeumel
Levente Uzonyi wrote
Hi Marcel,

I suppose this change has broken all StrikeFonts other than Bitmap DejaVu
Sans.

Levente

On Thu, 16 Jun 2016, [hidden email] wrote:

> Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
> http://source.squeak.org/trunk/Graphics-mt.351.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-mt.351
> Author: mt
> Time: 16 June 2016, 1:56:13.140696 pm
> UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8
> Ancestors: Graphics-lpc.350
>
> Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore.
>
> =============== Diff against Graphics-lpc.350 ===============
>
> Item was changed:
>  ----- Method: StrikeFont>>ascentKern (in category 'accessing') -----
>  ascentKern
>   "Return the kern delta for ascenders."
> +
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self ascent-5+4)//4 max: 0]  "See makeItalicGlyphs"
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self ascent-5+4)//4 max: 0  "See makeItalicGlyphs"
>
>  !
>
> Item was changed:
>  ----- Method: StrikeFont>>baseKern (in category 'accessing') -----
>  baseKern
>   "Return the base kern value to be used for all characters."
>
> + self depth > 1 ifTrue: [^ 0].
> - | italic |
> - italic := emphasis allMask: 2.
>
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> + + (((self ascent-5+4)//4 max: 0))]!
> - glyphs depth > 1 ifTrue: [
> - ^(italic or: [ pointSize < 9 ])
> - ifTrue: [ 1 ]
> - ifFalse: [ 0] ].
> -
> - italic ifFalse: [^ 0].
> - ^ ((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> - + (((self ascent-5+4)//4 max: 0))!
>
> Item was changed:
>  ----- Method: StrikeFont>>descentKern (in category 'accessing') -----
>  descentKern
>   "Return the kern delta for descenders."
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self height-1-self ascent+4)//4 max: 0  "See makeItalicGlyphs"
>
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self height-1-self ascent+4)//4 max: 0]  "See makeItalicGlyphs"
> +
>  !
>
>
>
Hi Levente,

no, not at all. :) The interesting thing was that the only <9-point font (i.e. 7 point) there that had glyphs with more than 1-bit depth was the pre-rendered DejaVu Sans. It was an optimization that Juan put in for it, I guess.

Or are you referring to the way our Font Importer Tools is rendering fonts? That tool imports the point sizes 9 12 15 24 36 -- so, no "< 9" either. However, you are, right. If you modify TTCFont class >> pointSizes to also import fonts <9 points, the glyphs look too close together.

Still, currently, there are no broken fonts:

Accuat  #(18 )
Accujen  #(9 10 12 14 18 24 )
Accula  #(12 24 )
Accumon  #(9 10 12 )
Accuny  #(9 10 12 14 18 24 )
Accusf  #(18 )
Accushi  #(12 )
Accuve  #(12 14 )
Atlanta  #(11 22 )
Bitmap DejaVu Sans  #(7 9 12 14 17 20 )
BitstreamVeraSans  #(9 12 13 15 24 36 )
BitstreamVeraSansMono  #(9 12 15 24 36 )
BitstreamVeraSerif  #(9 12 15 18 24 36 )
ComicSansMS  #(6 9 11 17 26 )
Darkmap DejaVu Sans  #(7 9 12 14 17 20 )
DefaultFixedTextStyle  #(11 22 )
DefaultMultiStyle  #(9 10 12 14 18 24 )
DefaultTextStyle  #(7 9 12 14 17 20 )

Anyway, the right step would be to fix the glyph creation like Tobias did generate glyphs for the 7pt Deja Vu Sans with correct widths. That general kerning correction in StrikeFont was not a good idea.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Graphics-mt.351.mcz

marcel.taeumel
marcel.taeumel wrote
Levente Uzonyi wrote
Hi Marcel,

I suppose this change has broken all StrikeFonts other than Bitmap DejaVu
Sans.

Levente

On Thu, 16 Jun 2016, [hidden email] wrote:

> Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
> http://source.squeak.org/trunk/Graphics-mt.351.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-mt.351
> Author: mt
> Time: 16 June 2016, 1:56:13.140696 pm
> UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8
> Ancestors: Graphics-lpc.350
>
> Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore.
>
> =============== Diff against Graphics-lpc.350 ===============
>
> Item was changed:
>  ----- Method: StrikeFont>>ascentKern (in category 'accessing') -----
>  ascentKern
>   "Return the kern delta for ascenders."
> +
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self ascent-5+4)//4 max: 0]  "See makeItalicGlyphs"
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self ascent-5+4)//4 max: 0  "See makeItalicGlyphs"
>
>  !
>
> Item was changed:
>  ----- Method: StrikeFont>>baseKern (in category 'accessing') -----
>  baseKern
>   "Return the base kern value to be used for all characters."
>
> + self depth > 1 ifTrue: [^ 0].
> - | italic |
> - italic := emphasis allMask: 2.
>
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> + + (((self ascent-5+4)//4 max: 0))]!
> - glyphs depth > 1 ifTrue: [
> - ^(italic or: [ pointSize < 9 ])
> - ifTrue: [ 1 ]
> - ifFalse: [ 0] ].
> -
> - italic ifFalse: [^ 0].
> - ^ ((self height-1-self ascent+4)//4 max: 0)  "See makeItalicGlyphs"
> - + (((self ascent-5+4)//4 max: 0))!
>
> Item was changed:
>  ----- Method: StrikeFont>>descentKern (in category 'accessing') -----
>  descentKern
>   "Return the kern delta for descenders."
> - (emphasis noMask: 2) ifTrue: [^ 0].
> - ^ (self height-1-self ascent+4)//4 max: 0  "See makeItalicGlyphs"
>
> + self depth > 1 ifTrue: [^ 0].
> +
> + "Optimization for traditional 1-bit fonts."
> + ^ (emphasis allMask: 2)
> + ifFalse: [0]
> + ifTrue: [(self height-1-self ascent+4)//4 max: 0]  "See makeItalicGlyphs"
> +
>  !
>
>
>
Hi Levente,

no, not at all. :) The interesting thing was that the only <9-point font (i.e. 7 point) there that had glyphs with more than 1-bit depth was the pre-rendered DejaVu Sans. It was an optimization that Juan put in for it, I guess.

Or are you referring to the way our Font Importer Tools is rendering fonts? That tool imports the point sizes 9 12 15 24 36 -- so, no "< 9" either. However, you are, right. If you modify TTCFont class >> pointSizes to also import fonts <9 points, the glyphs look too close together.

Still, currently, there are no broken fonts:

Accuat  #(18 )
Accujen  #(9 10 12 14 18 24 )
Accula  #(12 24 )
Accumon  #(9 10 12 )
Accuny  #(9 10 12 14 18 24 )
Accusf  #(18 )
Accushi  #(12 )
Accuve  #(12 14 )
Atlanta  #(11 22 )
Bitmap DejaVu Sans  #(7 9 12 14 17 20 )
BitstreamVeraSans  #(9 12 13 15 24 36 )
BitstreamVeraSansMono  #(9 12 15 24 36 )
BitstreamVeraSerif  #(9 12 15 18 24 36 )
ComicSansMS  #(6 9 11 17 26 )
Darkmap DejaVu Sans  #(7 9 12 14 17 20 )
DefaultFixedTextStyle  #(11 22 )
DefaultMultiStyle  #(9 10 12 14 18 24 )
DefaultTextStyle  #(7 9 12 14 17 20 )

Anyway, the right step would be to fix the glyph creation like Tobias did generate glyphs for the 7pt Deja Vu Sans with correct widths. That general kerning correction in StrikeFont was not a good idea.

Best,
Marcel
It's also interesting that the Font Importer renders fonts with 96 Squeak-DPI but still produces glyphs smaller than Tobias (and Juan also, I guess) did for the DejaVu Sans with 72 DPI. There is a bug somewhere.

Best,
Marcel