Tobias Pape uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-topa.42.mcz
==================== Summary ====================
Name: TrueType-topa.42
Author: topa
Time: 1 June 2016, 12:11:05.54556 pm
UUID: d19fb495-4371-456b-8551-ab05a789f105
Ancestors: TrueType-topa.41
All fonts should know whether they have a glyph.
For the way TT fonts currently work, this information is tricky to get, tho.
=============== Diff against TrueType-topa.41 ===============
Item was added:
+ ----- Method: TTCFont>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+ "Answer whether this font includes a glyph for the given character"
+ ^ aCharacter charCode <= self maxAscii
+ and:[
+ aCharacter = Character null
+ ifTrue: [(self formOf: aCharacter) notNil]
+ ifFalse: [
+ "this should also be
+ (self formOf: aCharacter) notNil
+ but it does not work, the fallback glyph -- if present -- is always found instead.
+ So we fake. if aCharacter is the same form as Character null aka 0, we assume absence."
+ (self characterFormAt: aCharacter) bits ~= self fallbackForm bits]]!
Item was changed:
----- Method: TTCFont>>hasGlyphOf: (in category 'private') -----
hasGlyphOf: aCharacter
+ "Answer whether this font includes a glyph for the given character (or a fallback)"
+ self flag: #topa. "formOf: never actually returns nil for ttcfonts..."
- "Answer whether this font includes a glyph for the given character"
^ aCharacter charCode <= self maxAscii
and:[(self formOf: aCharacter) notNil]!
Item was added:
+ ----- Method: TTCFontSet>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+ "see TTCFont>>hasGlyphOf:"
+ ^ fontArray first basicHasGlyphOf: aCharacter!
Item was added:
+ ----- Method: TTCFontSet>>hasGlyphOf: (in category 'private') -----
+ hasGlyphOf: aCharacter
+ "see TTCFont>>hasGlyphOf:"
+ ^ fontArray first hasGlyphOf: aCharacter!
Tobias Pape uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-topa.213.mcz
==================== Summary ====================
Name: Multilingual-topa.213
Author: topa
Time: 1 June 2016, 12:09:52.450255 pm
UUID: 3b6d0aef-b027-4adc-8442-10f00e2eaeb2
Ancestors: Multilingual-pre.212
All fonts should know whether they have a glyph.
=============== Diff against Multilingual-pre.212 ===============
Item was added:
+ ----- Method: StrikeFontSet>>basicHasGlyphOf: (in category 'private') -----
+ basicHasGlyphOf: aCharacter
+
+ | actualFont |
+ actualFont := self fontOf: aCharacter ifAbsent: [^ false].
+ ^ actualFont basicHasGlyphOf: aCharacter!
Tobias Pape uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-topa.1155.mcz
==================== Summary ====================
Name: Morphic-topa.1155
Author: topa
Time: 1 June 2016, 12:07:52.187561 pm
UUID: 7b8792c9-7a3f-4c43-85a7-18d40734b624
Ancestors: Morphic-mt.1154
Let the fonts provide their sample
=============== Diff against Morphic-mt.1154 ===============
Item was changed:
----- Method: FontChooserTool>>contents (in category 'toolbuilder') -----
contents
+
+ ^ self selectedFont
+ ifNil: [Text new]
+ ifNotNil: [:font | font sampleText]!
- | sample i c f |
- sample := WriteStream on: ''.
- f := self selectedFont ifNil:[^Text new].
- f isSymbolFont ifFalse:[
- sample
- nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr;
- nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr;
- nextPutAll: '0123456789'; cr; cr;
- nextPutAll:
- 'Lorem ipsum dolor sit amet, consectetur adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et dolore
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate
- velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
- sint occaecat cupidatat non proident, sunt in culpa qui
- officia deserunt mollit anim id est laborum.'
- ] ifTrue:[
- i := 0.
- 33 to: 255 do:[:ci |
- sample nextPut: (c:=Character value: ci).
- i := i + 1.
- (('@Z`z' includes:c) or:[i = 30])
- ifTrue:[i :=0. sample cr]].
- ].
- sample := sample contents asText.
- sample addAttribute: (TextFontReference toFont: f).
- ^sample!
Item was changed:
----- Method: FontImporterTool>>previewText (in category 'model access') -----
previewText
+
+ ^ self selectedFont
+ ifNil: [Text new]
+ ifNotNil: [:font | font sampleText]!
- | sample i c f |
- sample := WriteStream on: ''.
- f := self selectedFont ifNil:[^Text new].
- (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[
- sample
- nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr;
- nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr;
- nextPutAll: '0123456789'; cr; cr;
- nextPutAll:
- 'Lorem ipsum dolor sit amet, consectetur adipisicing elit,
- sed do eiusmod tempor incididunt ut labore et dolore
- magna aliqua. Ut enim ad minim veniam, quis nostrud
- exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate
- velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
- sint occaecat cupidatat non proident, sunt in culpa qui
- officia deserunt mollit anim id est laborum.'
- ] ifTrue:[
- i := 0.
- 33 to: 255 do:[:ci |
- sample nextPut: (c:=Character value: ci).
- i := i + 1.
- (('@Z`z' includes:c) or:[i = 30])
- ifTrue:[i :=0. sample cr]].
- ].
- sample := sample contents asText.
- sample addAttribute: (TextFontReference toFont: f).
- ^sample!
Tobias Pape uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-topa.694.mcz
==================== Summary ====================
Name: Collections-topa.694
Author: topa
Time: 1 June 2016, 12:04:48.190653 pm
UUID: b7698582-d2b0-4c81-b338-63705fd800ab
Ancestors: Collections-mt.693
provide some sample text in Text
=============== Diff against Collections-mt.693 ===============
Item was added:
+ ----- Method: Text class>>THEQUICKBROWNFOX (in category 'filler text') -----
+ THEQUICKBROWNFOX
+
+ ^ self fromString: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'!
Item was added:
+ ----- Method: Text class>>allDigits (in category 'filler text') -----
+ allDigits
+
+ ^ self fromString: '0123456789'!
Item was added:
+ ----- Method: Text class>>hamburgefonstiv (in category 'filler text') -----
+ hamburgefonstiv
+
+ ^ self fromString: 'Hamburgefonstiv'!
Item was added:
+ ----- Method: Text class>>loremIpsum (in category 'filler text') -----
+ loremIpsum
+
+ ^ self fromString: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et dolore
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate
+ velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
+ sint occaecat cupidatat non proident, sunt in culpa qui
+ officia deserunt mollit anim id est laborum.'!
Item was added:
+ ----- Method: Text class>>symbolSample (in category 'filler text') -----
+ symbolSample
+
+ ^ self streamContents: [:stream | | lineLength character|
+ lineLength := 0.
+ 33 to: 255 do:[ :index |
+ character := stream nextPut: (Character value: index).
+ lineLength := lineLength + 1.
+ (('@Z`z' includes: character) or: [lineLength >= 30])
+ ifTrue: [
+ lineLength :=0.
+ stream cr]]]!
Item was added:
+ ----- Method: Text class>>textSample (in category 'filler text') -----
+ textSample
+
+ ^ self streamContents: [:stream |
+ stream
+ nextPutAll: self hamburgefonstiv; cr;
+ nextPutAll: self theQuickBrownFox; cr;
+ nextPutAll: self THEQUICKBROWNFOX; cr; cr;
+ nextPutAll: self allDigits; cr; cr;
+ nextPutAll: self loremIpsum]!
Item was added:
+ ----- Method: Text class>>theQuickBrownFox (in category 'filler text') -----
+ theQuickBrownFox
+
+ ^ self fromString: 'the quick brown fox jumps over the lazy dog'!