The Trunk: Graphics-topa.340.mcz

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

The Trunk: Graphics-topa.340.mcz

commits-2
Tobias Pape uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-topa.340.mcz

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

Name: Graphics-topa.340
Author: topa
Time: 1 June 2016, 12:06:46.38159 pm
UUID: 31a4dc33-1d42-4817-bdeb-08b727a63d52
Ancestors: Graphics-bf.339

All fonts should know whether they have a glyph.

Also, provide a sample text styled with a font.

=============== Diff against Graphics-bf.339 ===============

Item was added:
+ ----- Method: AbstractFont>>basicHasGlyphOf: (in category 'testing') -----
+ basicHasGlyphOf: aCharacter
+
+ self subclassResponsibility!

Item was added:
+ ----- Method: AbstractFont>>hasGlyphOf: (in category 'testing') -----
+ hasGlyphOf: aCharacter
+
+ ^ self basicHasGlyphOf: aCharacter!

Item was added:
+ ----- Method: AbstractFont>>sampleText (in category 'example') -----
+ sampleText
+
+ | text |
+ text := (self isSymbolFont or: [(self basicHasGlyphOf: $a) not])
+ ifTrue: [Text symbolSample]
+ ifFalse: [Text textSample].
+ text addAttribute: (TextFontReference toFont: self).
+ ^ text!

Item was added:
+ ----- Method: FixedFaceFont>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+
+ " We present the same for any character, so, yes"
+ ^ true!

Item was added:
+ ----- Method: StrikeFont>>basicHasGlyphOf: (in category 'multibyte character methods') -----
+ basicHasGlyphOf: aCharacter
+
+ ^ self hasGlyphForCode: (self codeForCharacter: aCharacter)
+ !

Item was removed:
- ----- Method: StrikeFont>>hasGlyphOf: (in category 'multibyte character methods') -----
- hasGlyphOf: aCharacter
-
- ^self hasGlyphForCode: (self codeForCharacter: aCharacter)
- !