Multilingual

ByteTextConverter
A ByteTextConverter is the abstract class for text converters on single byte encodings.
byteToUnicode:
Map from my byte based encoding to unicode.
Due to the leading char encoding this is not strictly true, but hopefully at some point we can get rid of the leading char overhead.
byteToUnicodeSpec
byteToUnicodeTable
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeTables
languageEnvironment
nextFromStream:
Read the next byte (we are only dealing with byte based encodings here) character from aStream and return the result converted to unicode.
nextPut:toStream:
Write the unicode character to aStream.
unicodeToByte:
unicodeToByteTable
CNGBTextConverter
Text converter for Simplified Chinese variation of EUC. (Even though the name doesn't look so, it is what it is.)
encodingNames
languageEnvironment
leadingChar
CP1250TextConverter
Text converter for CP1250. Windows code page used in Eastern Europe.
byteToUnicodeSpec
encodingNames
languageEnvironment
CP1253TextConverter
Text converter for CP1253. Windows code page used for Greek.
byteToUnicodeSpec
encodingNames
languageEnvironment
CombinedChar
A CombinedChar is xxxxxxxxx.
Instance Variables
codes: <Object>
combined: <Object>
codes
- xxxxx
combined
- xxxxx
add:
base
combined
combinesWith:
isCompositionCharacter:
isDiacriticals:
parseCompositionMappingFrom:
simpleAdd:
CompoundTextConverter
Text converter for X Compound Text.
emitSequenceToResetStateIfNeededOn:
encodingNames
initialize
Subclasses should redefine this method to perform initializations on instance creation
nextFromStream:
nextPut:toStream:
nextPutValue:toStream:withShiftSequenceIfNeededForLeadingChar:
parseShiftSeqFromStream:
restoreStateOf:with:
saveStateOf:
CompoundTextConverterState
This represents the state of CompoundTextConverter.
charSize
charSize:
g0Leading
g0Leading:
g0Size
g0Size:
g0Size:g1Size:g0Leading:g1Leading:charSize:streamPosition:
g1Leading
g1Leading:
g1Size
g1Size:
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
streamPosition
streamPosition:
EFontBDFFontReader
An EFontBDFFontReader is xxxxxxxxx.
Instance Variables
readCharactersInRangeFrom:to:totalNums:storeInto:
readFrom:to:
EFontBDFFontReaderForRanges
An EFontBDFFontReaderForRanges is xxxxxxxxx.
Instance Variables
additionalRangesForJapanese
additionalRangesForKorean
override:with:ranges:transcodingTable:additionalRange:
rangesForGreek
rangesForJapanese
rangesForKorean
rangesForLatin2
rangesForRussian
readCharactersInRanges:storeInto:
readRanges:
readRanges:overrideWith:otherRanges:additionalOverrideRange:
EUCJPTextConverter
Text converter for Japanese variation of EUC.
encodingNames
languageEnvironment
leadingChar
EUCKRTextConverter
Text converter for Korean variation of EUC.
encodingNames
languageEnvironment
leadingChar
EUCTextConverter
Text converter for Extended Unix Character. This is an abstract class. The CJK variations are implemented as subclasses.
languageEnvironment
leadingChar
nextFromStream:
nextPut:toStream:
nonUnicodeClass
EncodedCharSet
An abstract superclasss of the classes that represent encoded character sets. In the old implementation, the charsets had more important role. However, in the current implementation, the subclasses are used only for keeping the backward compatibility.
The other confusion comes from the name of "Latin1" class. It used to mean the Latin-1 (ISO-8859-1) character set, but now it primarily means that the "Western European languages that are covered by the characters in Latin-1 character set.
canBeGlobalVarInitial:
canBeNonGlobalVarInitial:
charFromUnicode:
charsetAt:
digitValue:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBreakableAt:in:
isCharset
isDigit:
isLetter:
isLowercase:
isUppercase:
leadingChar
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
printingDirection
ucsTable
FixedFaceFont
I am a font for special purpose like password or fallback.
I can show same form whenever someone requests any character.
Variable displaySelector is future use to show a form dynamically.
(Although it would be unnecessary...)
ascent
baseFont
baseFont:
baseKern
characterFormAt:
descent
descentKern
displayErrorOn:length:at:kern:
displayErrorOn:length:at:kern:baselineY:
displayPasswordOn:length:at:kern:
displayPasswordOn:length:at:kern:baselineY:
displayString:on:from:to:at:kern:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayString:on:from:to:at:kern:baselineY:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayString:on:from:to:at:kern:from:
displayString:on:from:to:at:kern:from:baselineY:
emphasized:
errorFont
familyName
Answer the name to be used as a key in the TextConstants dictionary.
fontSize:
glyphInfoOf:into:
height
Answer the height of the receiver, total of maximum extents of
characters above and below the baseline.
initialize
Subclasses should redefine this method to perform initializations on instance creation
installOn:foregroundColor:backgroundColor:
Install the receiver on the given DisplayContext (either BitBlt or Canvas) for further drawing operations.
lineGrid
Answer the relative space between lines
maxAscii
passwordCharacter
passwordFont
pointSize
releaseCachedState
widthOf:
Return the width of the given character
GB2312
This class represents the domestic character encoding called GB 2312 used for simplified Chinese.
compoundTextSequence
initialize
Subclasses should redefine this method to perform initializations on instance creation
isLetter:
leadingChar
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
ucsTable
GreekEnvironment
This class provides the support for Greek. It is here, but most of the methods are not implemented yet.
defaultEncodingName
leadingChar
supportedLanguages
systemConverterClass
ISO88592TextConverter
Text converter for ISO 8859-2. An international encoding used in Eastern Europe.
byteToUnicodeSpec
encodingNames
initialize
Subclasses should redefine this method to perform initializations on instance creation
languageEnvironment
ISO88597TextConverter
Text converter for ISO 8859-7. An international encoding used for Greek.
byteToUnicodeSpec
encodingNames
initialize
Subclasses should redefine this method to perform initializations on instance creation
languageEnvironment
ImmAbstractPlatform
An ImmAbstractPlatform is xxxxxxxxx.
Instance Variables
keyboardFocusForAMorph:
do nothing
ImmWin32
An ImmWin32 is xxxxxxxxx.
Instance Variables
keyboardFocusForAMorph:
do nothing
setCompositionWindowPositionX:y:
ImmX11
An ImmX11 is xxxxxxxxx.
Instance Variables
keyboardFocusForAMorph:
do nothing
setCompositionWindowPositionX:y:
JISX0208
This class represents the domestic character encoding called JIS X 0208 used for Japanese.
charAtKuten:
compoundTextSequence
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBreakableAt:in:
isLetter:
leadingChar
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
printingDirection
stringFromKutenArray:
ucsTable
unicodeLeadingChar
JapaneseEnvironment
This class provides the Japanese support. Since it has been used most other than default 'latin-1' languages, this tends to be a good place to look at when you want to know what a typical subclass of LanguageEnvironment should do.
defaultEncodingName
flapTabTextFor:in:
fromJISX0208String:
isBreakableAt:in:
leadingChar
scanSelector
supportedLanguages
systemConverterClass
traditionalCharsetClass
KOI8RTextConverter
A KOI8RTextConverter is xxxxxxxxx.
Instance Variables
byteToUnicodeSpec
encodingNames
languageEnvironment
KSX1001
This class represents the domestic character encoding called KS X 1001 used for Korean.
compoundTextSequence
initialize
Subclasses should redefine this method to perform initializations on instance creation
isLetter:
leadingChar
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
ucsTable
KoreanEnvironment
This class provides the Korean support. Unfortunately, we haven't tested this yet. We did have a working version in previous implementations, but not this new implementation. But as soon as we find somebody who understand the language, probably we can make it work in two days or so, as we have done for Czech support.
defaultEncodingName
fontDownloadUrls
leadingChar
supportedLanguages
systemConverterClass
traditionalCharsetClass
LanguageEditor
Editor for Babel's languages.
Open it from
World Menu >> open... >> Language Editor (to open on default language)
World Menu >> open... >> Language Editor for... (to choose the language)
Or click:
LanguageEditor openOnDefault.
LanguageEditor open.
See http://swiki.agro.uba.ar/small_land/191 for documentation
addTranslation
translate a phrase
applyTranslations
private - try to apply the translations as much as possible all
over the image
asHtml:
beep
browseMethodsWithTranslation
browseMethodsWithUntranslated
check
check the translations and answer a collection with the results
checkMethods
checkPhrase:translation:
checkSpanishPhrase:translation:
check the translation an aswer a string with a comment or a
nil meaning no-comments
checkUntranslatedPhrase:
check the phrase an aswer a string with a comment or a nil
meaning no-comments
codeSelectedTranslation
codeSelectedTranslationAsMimeString
createButtonLabel:action:help:
create a toolbar for the receiver
createMainToolbar
create a toolbar for the receiver
createRow
create a row
createStatusbar
create the statusbar for the receiver
createTranslationsToolbar
create a toolbar for the receiver
createUntranslatedToolbar
create a toolbar for the receiver
createUpdatingButtonWording:action:help:
create a toolbar for the receiver
delete
Remove the receiver as a submorph of its owner
deselectAllTranslation
ensureVisibilityOfWindow:
filterTranslations
filterTranslations:
filterUntranslated
filterUntranslated:
getTextExport
identifyUnusedStrings
self new identifyUnusedStrings
initCheckMethods
initialize
Initialize a system window. Add label, stripes, etc., if desired
initializeNewerKeys
initializeOn:
initialize the receiver on aLanguage
initializePanels
initialize the receiver's panels
initializeStatusbar
initialize the receiver's statusbar
initializeToolbars
initialize the receiver's toolbar
loadFromFile
mergeFromFile
numberOfTimesStringIsUsed:
okToChange
Allows a controller to ask this of any model
on:
open
openOn:
openOnDefault
perform:orSendTo:
I wish to intercept and handle selector myself
phrase:translation:
set the models's translation for phraseString
phraseToTranslate
answer a phrase to translate. use the selected untranslated phrase or ask for a new one
printHeaderReportOn:
append to aStream a header report of the receiver with swiki
format
printReportOn:
append to aStream a report of the receiver with swiki format
printTranslationsReportOn:
append to aStream a report of the receiver's translations
printUntranslatedReportOn:
append to aStream a report of the receiver's translations
refreshTranslations
refresh the translations panel
refreshUntranslated
refresh the untranslated panel
removeTranslatedButUnusedStrings
removeTranslation
remove the selected translation
removeUntranslated
remove the selected untranslated phrase
removeUntranslatedButUnusedStrings
report
reportString
answer a string with a report of the receiver
resetNewerKeys
saveToFile
save the translator to a file
searchTranslation
searchTranslation:
searchUntranslated
searchUntranslated:
selectAllTranslation
selectNewerKeys
selectTranslationFileName
answer a file with a translation
selectTranslationPhrase:
selectUntranslatedPhrase:
selectedTranslation
answer the selectedTranslation
selectedTranslation:
change the receiver's selectedTranslation
selectedTranslationsAt:
selectedTranslationsAt:put:
selectedUntranslated
answer the selectedUntranslated
selectedUntranslated:
change the selectedUntranslated
status
answer a status string
translate
translate a phrase
translatePhrase:
translate aString
translation
answer the translation for the selected phrase
translation:
change the translation for the selected phrase
translations
answet the translator's translations
translationsFilter
translationsFilterWording
translationsKeystroke:
Respond to a Command key in the translations list.
translationsMenu:
translator
unload
untranslated
answer the translator's untranslated phrases
untranslatedFilter
untranslatedFilterWording
untranslatedKeystroke:
Respond to a Command key in the translations list.
untranslatedMenu:
update:
Receive a change notice from an object of whom the receiver
is a dependent.
LanguageEnvironment
The name multilingualized Squeak suggests that you can use multiple language at one time. This is true, of course, but the system still how to manage the primary language; that provides the interpretation of data going out or coming in from outside world. It also provides how to render strings, as there rendering rule could be different in one language to another, even if the code points in a string is the same.
Originally, LanguageEnvironment and its subclasses only has class side methods. After merged with Diego's Babel work, it now has instance side methods. Since this historical reason, the class side and instance side are not related well.
When we talk about the interface with the outside of the Squeak world, there are three different "channels"; the keyboard input, clipboard output and input, and filename. On a not-to-uncommon system such as a Unix system localized to Japan, all of these three can have (and does have) different encodings. So we need to manage them separately. Note that the encoding in a file can be anything. While it is nice to provide a suggested guess for this 'default system file content encoding', it is not critical.
Rendering support is limited basic L-to-R rendering so far. But you can provide different line-wrap rule, at least.
canBeGlobalVarInitial:
canBeNonGlobalVarInitial:
checkPhrase:translation:
check the translation.
Answer a string with a comment or meaning no-comments
clearDefault
currentPlatform
defaultEncodingName
defaultFileNameConverter
defaultSystemConverter
digitValue:
fileNameConverterClass
flapTabTextFor:
flapTabTextFor:in:
fontDownload
(Locale isoLanguage: 'ja') languageEnvironment fontDownload
fontDownloadUrls
fontEncodingName
fontFileName
(Locale isoLanguage: 'ja') languageEnvironment fontFileName
fontFullName
(Locale isoLanguage: 'ja') languageEnvironment fontFullName
initKnownEnvironments
initialize
Subclasses should redefine this method to perform initializations on instance creation
installFont
(Locale isoLanguage: 'ja') languageEnvironment installFont
isBreakableAt:in:
isCharset
isDigit:
isFontAvailable
isLetter:
isLowercase:
isUppercase:
isoCountry
isoLanguage
knownEnvironments
leadingChar
localeChanged
localeChangedGently
localeID
localeID:
removeFonts
(Locale isoLanguage: 'ja') languageEnvironment removeFonts
resetKnownEnvironments
scanSelector
setUsePangoFlag
setupSqueaklandSpecifics
Write language specific settings here
startUp
supportedLanguages
systemConverterClass
usePangoRenderer
Latin1
This class represents the domestic character encoding called ISO-8859-1, also known as Latin-1 used for Most of the Western European Languages.
emitSequenceToResetStateIfNeededOn:forState:
initialize
Subclasses should redefine this method to perform initializations on instance creation
isBreakableAt:in:
isLetter:
leadingChar
nextPutRightHalfValue:toStream:withShiftSequenceIfNeededForTextConverterState:
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
printingDirection
Latin1Environment
This class provides the support for the languages in 'Latin-1' category. Although we could have different language environments for different languages in the category, so far nobody seriously needed it.
defaultEncodingName
leadingChar
nextPutRightHalfValue:toStream:withShiftSequenceIfNeededForTextConverterState:
nextPutValue:toStream:withShiftSequenceIfNeededForTextConverterState:
supportedLanguages
systemConverterClass
traditionalCharsetClass
Latin1TextConverter
Text converter for ISO 8859-1. An international encoding used in Western Europe.
byteToUnicode:
Map from my byte based encoding to unicode.
Due to the leading char encoding this is not strictly true, but hopefully at some point we can get rid of the leading char overhead.
encodingNames
initializeTables
languageEnvironment
unicodeToByte:
Latin2Environment
This class provides the support for the languages in 'Latin-2' category. Although we could have different language environments for different languages in the category, so far nobody seriously needed it.
I (Yoshiki) don't have good knowledge in these language, so when Pavel Krivanek volunteered to implement the detail, it was a good test to see how flexible my m17n framework was. There are a few glitches, but with several email conversations over a few days, we managed to make it work relatively painlessly. I thought this went well.
There seem that some source of headache, as Windows doesn't exactly use Latin-2 encoded characters, but a little modified version called 'code page 1250'. Similar to Japanese support, the encode interpreters are swapped based on the type of platform it is running on.
defaultEncodingName
leadingChar
supportedLanguages
systemConverterClass
LinedTTCFont
A LinedTTCFont is xxxxxxxxx.
Instance Variables
contourWidth: <Object>
emphasis: <Object>
lineGlyph: <Object>
contourWidth
- xxxxx
emphasis
- xxxxx
lineGlyph
- xxxxx
computeForm:
emphasis
Answer the emphasis code (0 to 3) corresponding to my subfamily name
emphasis:
fromTTCFont:emphasis:
lineGlyph:
MacRomanTextConverter
Text converter for Mac Roman. An encoding used for the languages originated from Western Europe area.
byteToUnicodeSpec
encodingNames
languageEnvironment
MultiByteBinaryOrTextStream
It is similar to MultiByteFileStream, but works on in memory stream.
asBinaryOrTextStream
Convert to a stream that can switch between bytes and characters
ascii
basicNext
basicNext:
basicNext:into:
basicNextInto:
basicNextPut:
basicNextPutAll:
basicPeek
basicPosition
basicPosition:
binary
do nothing
contents
Answer with a copy of my collection from 1 to readLimit.
converter
converter:
defaultConverter
fileIn
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation.
fileInObjectAndCode
This file may contain:
1) a fileIn of code
2) just an object in SmartReferenceStream format
3) both code and an object.
File it in and return the object. Note that self must be a FileStream or RWBinaryOrTextStream. Maybe ReadWriteStream incorporate RWBinaryOrTextStream?
fileInObjectAndCodeForProject
This file may contain:
1) a fileIn of code
2) just an object in SmartReferenceStream format
3) both code and an object.
File it in and return the object. Note that self must be a FileStream or RWBinaryOrTextStream. Maybe ReadWriteStream incorporate RWBinaryOrTextStream?
fileInProject
fileOutClass:andObject:
Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically.
guessConverter
isBinary
Return true if the receiver is a binary byte stream
next
Primitive. Return the next object in the Stream represented by the
receiver. Fail if the collection of this stream is not an Array or a String.
Fail if the stream is positioned at its end, or if the position is out of
bounds in the collection. Optional. See Object documentation
whatIsAPrimitive.
next:
self halt.
nextDelimited:
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character. For example: 'this '' was a quote'. Start postioned before the initial terminator.
nextMatchAll:
Answer true if next N objects are the ones in aColl,
else false. Advance stream of true, leave as was if false.
nextPut:
Primitive. Insert the argument at the next position in the Stream
represented by the receiver. Fail if the collection of this stream is not an
Array or a String. Fail if the stream is positioned at its end, or if the
position is out of bounds in the collection. Fail if the argument is not
of the right type for the collection. Optional. See Object documentation
whatIsAPrimitive.
nextPutAll:
Append the elements of aCollection to the sequence of objects accessible
by the receiver. Answer aCollection.
on:encoding:
padToEndWith:
We don't have pages, so we are at the end, and don't need to pad.
peek
Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.
peekFor:
self atEnd ifTrue: [^ false]. -- SFStream will give nil
reset
Refer to the comment in PositionableStream|reset.
setConverterForCode
setConverterForCodeForProject
setEncoderForSourceCodeNamed:
setFileTypeToObject
do nothing. We don't have a file type
skipSeparators
skipSeparatorsAndPeekNext
A special function to make nextChunk fast
text
upTo:
Answer a subcollection from the current access position to the
occurrence (if any, but not inclusive) of anObject in the receiver. If
anObject is not in the collection, answer the entire rest of the receiver.
upToEnd
Answer a subcollection from the current access position through the last element of the receiver.
with:encoding:
MultiByteFileStream
The central class to access the external file. The interface of this object is similar to good old StandardFileStream, but internally it asks the converter, which is a sub-instance of TextConverter, and do the text conversion.
It also combined the good old CrLfFileStream. CrLfFileStream class>>new now returns an instance of MultiByteFileStream.
There are several pitfalls:
* You always have to be careful about the binary/text distinction. In #text mode, it usually interpret the bytes.
* A few file pointer operations treat the file as uninterpreted byte no matter what. This means that if you use 'fileStream skip: -1', 'fileStream position: x', etc. in #text mode, the file position can be in the middle of multi byte character. If you want to implement some function similar to #peek for example, call the saveStateOf: and restoreStateOf: methods to be able to get back to the original state.
* #lineEndConvention: and #wantsLineEndConversion: (and #binary) can cause some puzzling situation because the inst var lineEndConvention and wantsLineEndConversion are mutated. If you have any suggestions to clean up the protocol, please let me know.
ascii
opposite of binary
bareNext
basicNext:
basicNext:into:
basicNextInto:
basicNextPut:
basicNextPutAll:
basicPeek
basicPosition
basicPosition:
basicReadInto:startingAt:count:
basicSetToEnd
basicSkip:
basicUpTo:
basicVerbatim:
binary
Set this file to binary mode.
convertStringFromCr:
convertStringToCr:
converter
converter:
defaultToCR
defaultToCRLF
defaultToLF
detectLineEndConvention
Detect the line end convention used in this stream. The result may be either #cr, #lf or #crlf.
doConversion
fileIn
Guarantee that the receiver is readOnly before fileIn for efficiency and
to eliminate remote sharing conflicts.
fileInEncodingName:
fileInObjectAndCodeForProject
This file may contain:
1) a fileIn of code
2) just an object in SmartReferenceStream format
3) both code and an object.
File it in and return the object. Note that self must be a FileStream or RWBinaryOrTextStream. Maybe ReadWriteStream incorporate RWBinaryOrTextStream?
fileInProject
fileOutClass:andObject:
Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically.
filterFor:
guessDefaultLineEndConvention
initialize
Subclasses should redefine this method to perform initializations on instance creation
lineEndConvention
lineEndConvention:
newFrom:
next
Answer the next byte from this file, or nil if at the end of the file.
next:
Return a string with the next n characters of the filestream in it. 1/31/96 sw
next:innerFor:
if we just read a CR, and the next character is an LF, then skip the LF
nextDelimited:
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character. For example: 'this '' was a quote'. Start postioned before the initial terminator.
nextMatchAll:
Answer true if next N objects are the ones in aColl,
else false. Advance stream of true, leave as was if false.
nextPut:
Write the given character to this file.
nextPutAll:
Write all the characters of the given string to this file.
open:forWrite:
Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode.
peek
Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil.
peekFor:
self atEnd ifTrue: [^ false]. -- SFStream will give nil
reset
Set the current character position to the beginning of the file.
1/31/96 sw: subclassResponsibility
setConverterForCode
setConverterForCodeForProject
skipSeparators
skipSeparatorsAndPeekNext
A special function to make nextChunk fast
startUp
upTo:
Fast version to speed up nextChunk
upToEnd
Answer a subcollection from the current access position through the last element of the receiver.
wantsLineEndConversion
wantsLineEndConversion:
MultiCanvasCharacterScanner
A MultiCanvasCharacterScanner is xxxxxxxxx.
Instance Variables
canvas: <Object>
fillBlt: <Object>
foregroundColor: <Object>
lineY: <Object>
runX: <Object>
canvas
- xxxxx
fillBlt
- xxxxx
foregroundColor
- xxxxx
lineY
- xxxxx
runX
- xxxxx
canvas:
set the canvas to draw on
cr
When a carriage return is encountered, simply increment the pointer
into the paragraph.
crossedX
This condition will sometimes be reached 'legally' during display, when,
for instance the space that caused the line to wrap actually extends over
the right boundary. This character is allowed to display, even though it
is technically outside or straddling the clipping ectangle since it is in
the normal case not visible and is in any case appropriately clipped by
the scanner.
displayLine:offset:leftInRun:
largely copied from DisplayScanner's routine.
Fixed to set left margin after setting up alignment.
doesDisplaying
endOfRun
The end of a run in the display case either means that there is actually
a change in the style (run code) to be associated with the string or the
end of this line has been reached.
paddedSpace
Each space is a stop condition when the alignment is right justified.
Padding must be added to the base width of the space according to
which space in the line this space is and according to the amount of
space that remained at the end of the line when it was composed.
setFont
Set the font and other emphasis.
setStopConditions
Set the font and the stop conditions for the current run.
tab
textColor:
Overridden in DisplayScanner
MultiCharacterBlockScanner
A MultiCharacterBlockScanner is xxxxxxxxx.
Instance Variables
characterIndex: <Object>
characterPoint: <Object>
lastCharacter: <Object>
lastCharacterExtent: <Object>
lastSpaceOrTabExtent: <Object>
nextLeftMargin: <Object>
specialWidth: <Object>
characterIndex
- xxxxx
characterPoint
- xxxxx
lastCharacter
- xxxxx
lastCharacterExtent
- xxxxx
lastSpaceOrTabExtent
- xxxxx
nextLeftMargin
- xxxxx
specialWidth
- xxxxx
buildCharacterBlockIn:
handle nullText
characterBlockAtPoint:in:
Answer a CharacterBlock for character in aParagraph at point aPoint. It
is assumed that aPoint has been transformed into coordinates appropriate
to the text's destination form rectangle and the composition rectangle.
characterBlockAtPoint:index:in:
This method is the Morphic characterBlock finder. It combines
MVC's characterBlockAtPoint:, -ForIndex:, and buildCharcterBlock:in:
characterBlockForIndex:in:
Answer a CharacterBlock for character in aParagraph at targetIndex. The
coordinates in the CharacterBlock will be appropriate to the intersection
of the destination form rectangle and the composition rectangle.
characterPointSetX:
cr
Answer a CharacterBlock that specifies the current location of the mouse
relative to a carriage return stop condition that has just been
encountered. The ParagraphEditor convention is to denote selections by
CharacterBlocks, sometimes including the carriage return (cursor is at
the end) and sometimes not (cursor is in the middle of the text).
crossedX
Text display has wrapping. The scanner just found a character past the x
location of the cursor. We know that the cursor is pointing at a character
or before one.
endOfRun
Before arriving at the cursor location, the selection has encountered an
end of run. Answer false if the selection continues, true otherwise. Set
up indexes for building the appropriate CharacterBlock.
indentationLevel:
set the number of tabs to put at the beginning of each line
lastCharacterExtentSetX:
lastSpaceOrTabExtentSetX:
paddedSpace
When the line is justified, the spaces will not be the same as the font's
space character. A padding of extra space must be considered in trying
to find which character the cursor is pointing at. Answer whether the
scanning has crossed the cursor.
placeEmbeddedObject:
Workaround: The following should really use #textAnchorType
scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern:
setFont
Set the font and other emphasis.
setStopConditions
Set the font and the stop conditions for the current run.
tab
MultiCharacterScanner
A MultiCharacterScanner is xxxxxxxxx.
Instance Variables
alignment: <Object>
baselineY: <Object>
destX: <Object>
destY: <Object>
emphasisCode: <Object>
firstDestX: <Object>
font: <Object>
indentationLevel: <Object>
kern: <Object>
lastIndex: <Object>
leftMargin: <Object>
line: <Object>
numOfComposition: <Object>
pendingKernX: <Object>
presentation: <Object>
presentationLine: <Object>
rightMargin: <Object>
runStopIndex: <Object>
spaceCount: <Object>
spaceWidth: <Object>
stopConditions: <Object>
text: <Object>
textStyle: <Object>
wantsColumnBreaks: <Object>
xTable: <Object>
alignment
- xxxxx
baselineY
- xxxxx
destX
- xxxxx
destY
- xxxxx
emphasisCode
- xxxxx
firstDestX
- xxxxx
font
- xxxxx
indentationLevel
- xxxxx
kern
- xxxxx
lastIndex
- xxxxx
leftMargin
- xxxxx
line
- xxxxx
numOfComposition
- xxxxx
pendingKernX
- xxxxx
presentation
- xxxxx
presentationLine
- xxxxx
rightMargin
- xxxxx
runStopIndex
- xxxxx
spaceCount
- xxxxx
spaceWidth
- xxxxx
stopConditions
- xxxxx
text
- xxxxx
textStyle
- xxxxx
wantsColumnBreaks
- xxxxx
xTable
- xxxxx
addCharToPresentation:
addEmphasis:
Set the bold-ital-under-strike emphasis.
addKern:
Set the current kern amount.
basicScanCharactersFrom:to:in:rightX:stopConditions:kern:
Primitive. This is the inner loop of text display--but see
scanCharactersFrom: to:rightX: which would get the string,
stopConditions and displaying from the instance. March through source
String from startIndex to stopIndex. If any character is flagged with a
non-nil entry in stops, then return the corresponding value. Determine
width of each character from xTable, indexed by map.
If dextX would exceed rightX, then return stops at: 258.
Advance destX by the width of the character. If stopIndex has been
reached, then return stops at: 257. Optional.
See Object documentation whatIsAPrimitive.
columnBreak
combinableChar:for:
embeddedObject
handleIndentation
indentationLevel
return the number of tabs that are currently being placed at the beginning of each line
indentationLevel:
set the number of tabs to put at the beginning of each line
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeFromParagraph:clippedBy:
initializeStringMeasurer
isBreakableAt:in:in:
leadingTab
return true if only tabs lie to the left
measureString:inFont:from:to:
WARNING: In order to use this method the receiver has to be set up using #initializeStringMeasurer
placeEmbeddedObject:
Place the anchoredMorph or return false if it cannot be placed.
In any event, advance destX by its width.
plainTab
This is the basic method of adjusting destX for a tab.
registerBreakableIndex
Record left x and character index of the line-wrappable point.
The default implementation here does nothing.
removeLastCharFromPresentation
scanCharactersFrom:to:in:rightX:stopConditions:kern:
scanJapaneseCharactersFrom:to:in:rightX:stopConditions:kern:
scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern:
scanMultiCharactersFrom:to:in:rightX:stopConditions:kern:
scanMultiCharactersR2LFrom:to:in:rightX:stopConditions:kern:
Note that 'rightX' really means 'endX' in R2L context. Ie. rightX is usually smaller than destX.
setActualFont:
Set the basal font to an isolated font reference.
setAlignment:
setConditionArray:
setFont
Set the font and other emphasis.
setFont:
Set the font by number from the textStyle.
text:textStyle:
textColor:
Overridden in DisplayScanner
wantsColumnBreaks:
widthOf:inFont:
MultiCompositionScanner
A MultiCompositionScanner is xxxxxxxxx.
Instance Variables
baseline: <Object>
baselineAtBreak: <Object>
breakAtSpace: <Object>
breakableIndex: <Object>
lastWidth: <Object>
lineHeight: <Object>
lineHeightAtBreak: <Object>
spaceX: <Object>
baseline
- xxxxx
baselineAtBreak
- xxxxx
breakAtSpace
- xxxxx
breakableIndex
- xxxxx
lastWidth
- xxxxx
lineHeight
- xxxxx
lineHeightAtBreak
- xxxxx
spaceX
- xxxxx
addCharToPresentation:
columnBreak
Answer true. Set up values for the text line interval currently being
composed.
composeFrom:inRectangle:firstLine:leftSide:rightSide:
Answer an instance of TextLineInterval that represents the next line in the paragraph.
composeLine:fromCharacterIndex:inParagraph:
Answer an instance of TextLineInterval that represents the next line in the paragraph.
cr
Answer true. Set up values for the text line interval currently being
composed.
crossedX
There is a word that has fallen across the right edge of the composition
rectangle. This signals the need for wrapping which is done to the last
space that was encountered, as recorded by the space stop condition.
endOfRun
Answer true if scanning has reached the end of the paragraph.
Otherwise step conditions (mostly install potential new font) and answer
false.
forParagraph:
Initialize the receiver for scanning the given paragraph.
getPresentation
getPresentationLine
placeEmbeddedObject:
Workaround: The following should really use #textAnchorType
presentation
presentationLine
registerBreakableIndex
Record left x and character index of the line-wrappable point.
Used for wrap-around. Answer whether the character has crossed the
right edge of the composition rectangle of the paragraph.
removeLastCharFromPresentation
rightX
Meaningful only when a line has just been composed -- refers to the
line most recently composed. This is a subtrefuge to allow for easy
resizing of a composition rectangle to the width of the maximum line.
Useful only when there is only one line in the form or when each line
is terminated by a carriage return. Handy for sizing menus and lists.
setActualFont:
Keep track of max height and ascent for auto lineheight
setFont
Set the font and other emphasis.
setStopConditions
Set the font and the stop conditions for the current run.
tab
Advance destination x according to tab settings in the paragraph's
textStyle. Answer whether the character has crossed the right edge of
the composition rectangle of the paragraph.
MultiDisplayScanner
A MultiDisplayScanner is xxxxxxxxx.
Instance Variables
backgroundColor: <Object>
bitBlt: <Object>
fillBlt: <Object>
foregroundColor: <Object>
ignoreColorChanges: <Object>
lineHeight: <Object>
lineY: <Object>
morphicOffset: <Object>
paragraph: <Object>
paragraphColor: <Object>
runX: <Object>
backgroundColor
- xxxxx
bitBlt
- xxxxx
fillBlt
- xxxxx
foregroundColor
- xxxxx
ignoreColorChanges
- xxxxx
lineHeight
- xxxxx
lineY
- xxxxx
morphicOffset
- xxxxx
paragraph
- xxxxx
paragraphColor
- xxxxx
runX
- xxxxx
cr
When a carriage return is encountered, simply increment the pointer
into the paragraph.
crossedX
This condition will sometimes be reached 'legally' during display, when,
for instance the space that caused the line to wrap actually extends over
the right boundary. This character is allowed to display, even though it
is technically outside or straddling the clipping ectangle since it is in
the normal case not visible and is in any case appropriately clipped by
the scanner.
defaultFont
displayLine:offset:leftInRun:
The call on the primitive (scanCharactersFrom:to:in:rightX:) will be interrupted according to an array of stop conditions passed to the scanner at which time the code to handle the stop condition is run and the call on the primitive continued until a stop condition returns true (which means the line has terminated). leftInRun is the # of characters left to scan in the current run; when 0, it is time to call setStopConditions.
displayLines:in:clippedBy:
The central display routine. The call on the primitive
(scanCharactersFrom:to:in:rightX:) will be interrupted according to an
array of stop conditions passed to the scanner at which time the code to
handle the stop condition is run and the call on the primitive continued
until a stop condition returns true (which means the line has
terminated).
endOfRun
The end of a run in the display case either means that there is actually
a change in the style (run code) to be associated with the string or the
end of this line has been reached.
initializeFromParagraph:clippedBy:
isBreakableAt:in:in:
paddedSpace
Each space is a stop condition when the alignment is right justified.
Padding must be added to the base width of the space according to
which space in the line this space is and according to the amount of
space that remained at the end of the line when it was composed.
placeEmbeddedObject:
Place the anchoredMorph or return false if it cannot be placed.
In any event, advance destX by its width.
plainTab
This is the basic method of adjusting destX for a tab.
presentationText:
scanMultiCharactersCombiningFrom:to:in:rightX:stopConditions:kern:
setDestForm:
setFont
Set the font and other emphasis.
setPort:
Install the BitBlt to use
setStopConditions
Set the font and the stop conditions for the current run.
tab
text:textStyle:foreground:background:fillBlt:ignoreColorChanges:
textColor:
Overridden in DisplayScanner
MultiNewParagraph
A MultiNewParagraph is xxxxxxxxx.
Instance Variables
presentationLines: <Object>
presentationText: <Object>
presentationLines
- xxxxx
presentationText
- xxxxx
displayOn:using:at:
Send all visible lines to the displayScanner for display
displayOnTest:using:at:
Send all visible lines to the displayScanner for display
multiComposeLinesFrom:to:delta:into:priorLines:atY:
While the section from start to stop has changed, composition may ripple all the way to the end of the text. However in a rectangular container, if we ever find a line beginning with the same character as before (ie corresponding to delta in the old lines), then we can just copy the old lines from there to the end of the container, with adjusted indices and y-values
presentationLines
presentationText
MultiTTCFont
A MultiTTCFont is xxxxxxxxx.
Instance Variables
access:at:
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
cacheAllNil
formOf:
glyphInfoOf:into:
Answer the width of the argument as a character in the receiver.
hasCached:ifTrue:
widthOf:
This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation.
MultiTextComposer
A MultiTextComposer is xxxxxxxxx.
Instance Variables
presentation: <Object>
presentationLines: <Object>
presentation
- xxxxx
presentationLines
- xxxxx
composeEachRectangleIn:
getPresentationInfo
multiComposeLinesFrom:to:delta:into:priorLines:atY:textStyle:text:container:wantsColumnBreaks:
NepaleseEnvironment
A NepaleseEnvironment is xxxxxxxxx.
Instance Variables
isFontAvailable
leadingChar
supportedLanguages
systemConverterClass
RussianEnvironment
A RussianEnvironment is xxxxxxxxx.
Instance Variables
leadingChar
supportedLanguages
systemConverterClass
ShiftJISTextConverter
Text converter for Shift-JIS. Mac and Windows in Japanese mode use this encoding.
encodingNames
katakanaValue:
leadingChar
nextFromStream:
nextPut:toStream:
sjisKatakanaFor:
toUnicode:
SimplifiedChineseEnvironment
This class provides the Simplified Chinese support (Used mainly in Mainland China). Unfortunately, we haven't tested this yet, but as soon as we find somebody who understand the language, probably we can make it work in two days or so, as we have done for Czech support.
defaultEncodingName
supportedLanguages
traditionalCharsetClass
SparseXTable
A SparseXTable is xxxxxxxxx.
Instance Variables
tables: <Object>
xTables: <Object>
tables
- xxxxx
xTables
- xxxxx
tableFor:
StrikeFontFixer
A StrikeFontFixer is xxxxxxxxx.
Instance Variables
charForms: <Object>
newFont: <Object>
strikeFont: <Object>
charForms
- xxxxx
newFont
- xxxxx
strikeFont
- xxxxx
characterFormAt:at:
displayOn:at:magnifyBy:
font:
forms
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeNoFontTable
mappingTable
newOn:
storeEditedGlyphsOn:
StrikeFontSet
A StrikeFontSet is xxxxxxxxx.
Instance Variables
derivativeFonts: <Object>
emphasis: <Object>
fontArray: <Object>
name: <Object>
rIndex: <Object>
derivativeFonts
- xxxxx
emphasis
- xxxxx
fontArray
- xxxxx
name
- xxxxx
rIndex
- xxxxx
addNewFont:at:
ascent
ascentKern
ascentOf:
baseKern
bonk:with:at:
Bonking means to run through the glyphs clearing out black pixels
between characters to prevent them from straying into an adjacent
character as a result of, eg, bolding or italicizing
characterFormAt:
characterFormAt:put:
characterToGlyphMap
used in
primDisplayString: aString from: startIndex to: stopIndex
map: font characterToGlyphMap xTable: font xTable
kern: kernDelta.

Since 'font xTable' using a first font xtable, we could use the same glyph mapping for it'

This should allow a primitive to not fail, because of characterToGlyphMap == nil
characters:in:displayAt:clippedBy:rule:fillColor:kernDelta:on:
Simple, slow, primitive method for displaying a line of characters.
No wrap-around is provided.
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
createExternalFontFileForLatin2:
createExternalFontFileForUnicodeJapanese:
createExternalFontFileForUnicodeKorean:
decodedFromRemoteCanvas:
derivativeFonts
descent
descentKern
descentOf:
displayLine:at:
Display the characters in aString, starting at position aPoint.
displayMultiString:on:from:to:at:kern:baselineY:
displayString:on:from:to:at:kern:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayString:on:from:to:at:kern:baselineY:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) BitBlt.
displayString:on:from:to:at:kern:from:baselineY:
displayStringR2L:on:from:to:at:kern:
duplicateArrayElementsForLeadingCharShift
emphasis
Answer the integer code for synthetic bold, italic, underline, and
strike-out.
emphasis:
Set the integer code for synthetic bold, itallic, underline, and strike-out,
where bold=1, italic=2, underlined=4, and struck out=8.
emphasized:
Answer a copy of the receiver with emphasis set to include code.
familyName
Answer the name to be used as a key in the TextConstants dictionary.
familyName:size:
familyName:size:emphasized:
familySizeFace
findMaximumLessThan:in:
fontArray
fontArray:
fontDisplay
TextStyle default defaultFont fontDisplay.
fontNameWithPointSize
fontOf:
Answer the actual font to use for aCharacter
fontOf:ifAbsent:
Answer the actual font to use for aCharacter
glyphInfoOf:into:
glyphs
glyphsEncoding:
height
Answer the height of the receiver, total of maximum extents of
characters above and below the baseline.
heightOf:
initializeWithFontArray:
Initialize with given font array, the ascent of primary font is modified
if another font has higher size
installExternalFontFileName6:encoding:encodingName:textStyleName:
installExternalFontFileName6:inDir:encoding:encodingName:textStyleName:
installExternalFontFileName:encoding:encodingName:textStyleName:
installExternalFontFileName:inDir:encoding:encodingName:textStyleName:
installExternalFontOn:encoding:encodingName:textStyleName:
installExternalFontOn:forLocale:
installNewFontAtIndex:fromOld:
installOn:
installOn:foregroundColor:backgroundColor:
Install the receiver on the given DisplayContext (either BitBlt or Canvas) for further drawing operations.
isFontSet
latin1
Answer primary font
lineGrid
Answer the relative space between lines
makeBoldGlyphs
Make a bold set of glyphs with same widths by ORing 1 bit to the right
(requires at least 1 pixel of intercharacter space)
makeItalicGlyphs
Make an italic set of glyphs with same widths by skewing left and right
(may require more intercharacter space)
makeStruckOutGlyphs
Make a struck-out set of glyphs with same widths
makeUnderlinedGlyphs
Make an underlined set of glyphs with same widths
maxAsciiFor:
maxEncoding
maxWidth
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
name:
newFontArray:
objectForDataStream:
I am about to be written on an object file. Write a reference to a known Font in the other system instead.
pointSize
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
questionGlyphInfoInto:
removeFontsForEncoding:encodingName:
reset
Reset the cache of derivative emphasized fonts
subscript
superscript
textStyle
widthOf:
Answer the width of the argument as a character in the receiver.
widthOfString:
widthOfString:from:to:
Measure the length of the given string between start and stop index
xTable
Answer an Array of the left x-coordinate of characters in glyphs.
xTableEncoding:
Answer an Array of the left x-coordinate of characters in glyphs.
TTCFont
I represent a font that uses TrueType derived glyph. Upon a request for glyph for a character through a call to #formOf: (or #widthOf:), I first search corresponding glyph in the cache. If there is not, it creates a 32bit depth form with the glyph.
The cache is weakly held. The entries are zapped at full GC.
Structure:
ttcDescription TTFontDescription -- The Squeak data structure for a TrueType font data file.
pointSize Number -- Nominal Em size in points. Conversion to pixel sizes depends on the definition of TextStyle class>>pixelsPerInch.
foregroundColor Color -- So far, this font need to know the glyph color in cache.
cache WeakArray of <Color -> <Array(256) of glyph>>
derivatives Array -- stores the fonts in the same family but different emphasis.
addLined
addLined:
ascent
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
cache
characterFormAt:
Answer a Form copied out of the glyphs for the argument,
character. Use a cached copy if possible.
classVersion
computeForm:
copy
Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.
deepCopy
Answer a copy of the receiver with its own copy of each instance
variable.
depth
derivativeFont:
derivativeFont:at:
derivativeFont:mainFont:
derivativeFontArray
derivativeFonts
descent
One is added to make sure the gap between lines is filled. If we don't add, multi line selection in a text pane look ugly.
descentKern
displayString:on:from:to:at:kern:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayString:on:from:to:at:kern:baselineY:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
emphasis
Answer the emphasis code (0 to 3) corresponding to my subfamily name
emphasis:
emphasized:
fallbackFont
fallbackFont:
family:size:
familyName
Answer the name to be used as a key in the TextConstants dictionary.
familyName:pointSize:emphasis:
familySizeFace
fileReaderServicesForFile:suffix:
flushCache
Flush the cache of this font
fontNameWithPointSize
foregroundColor
foregroundColor:
Install the given foreground color
formOf:
getExistings:
glyphInfoOf:into:
Answer the width of the argument as a character in the receiver.
hasGlyphOf:
height
Answer my height in pixels. This will answer a Float.
indexOfSubfamilyName:
decodeStyleName will consume all the modifiers and leave nothing if everything was recognized.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initialize:
installOn:
installOn:foregroundColor:backgroundColor:
Install the receiver on the given DisplayContext (either BitBlt or Canvas) for further drawing operations.
isCacheAllNil
isRegular
Answer true if I am a Regular/Roman font (i.e. not bold, etc.)
isTTCFont
lineGlyph:
lineGrid
Answer the relative space between lines
maxAscii
minAscii
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
newTextStyleFromTT:
newTextStyleFromTTFile:
newTextStyleFromTTStream:
objectForDataStream:
I am about to be written on an object file. Write a
reference to a known FontSet in the other system instead.
pixelSize
Make sure that we don't return a Fraction
pixelSize:
Make sure that we don't return a Fraction
pointSize
pointSize:
pointSizes
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
privatePointSize:
recreateCache
register:at:
registerAll
registry
releaseCachedState
removeAllDerivatives
removeStyleName:
reorganizeForNewFontArray:name:
repairBadSizes
reset
scale
scale:
serviceInstallTrueTypeFontStyle
services
setupDefaultFallbackFont
setupDefaultFallbackFontTo:
TTCFont allInstances do: [:i | i setupDefaultFallbackFontTo: (TextStyle named: 'MultiMSMincho')].
shutDown
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.
subfamilyName
textStyle
ttcDescription
ttcDescription:
unload
unregister:
version
veryDeepCopyWith:
Copy me and the entire tree of objects I point to. An object in the tree twice is copied once, and both references point to him. deepCopier holds a dictionary of objects we have seen. Some classes refuse to be copied. Some classes are picky about which fields get deep copied.
widthOf:
This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation.
TTCFontDescription
A TTCFontDescription is xxxxxxxxx.
Instance Variables
addFromTTFile:
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
clearDefault
clearDescriptions
default
descriptionNamed:
descriptionNamed:at:
initialize
Subclasses should redefine this method to perform initializations on instance creation
objectForDataStream:
I am about to be written on an object file. Write a reference to a known Font in the other system instead.
removeDescriptionNamed:
setDefault
TTCFontReader
A TTCFontReader is xxxxxxxxx.
Instance Variables
fonts: <Object>
fonts
- xxxxx
decodeCmapFmtTable:
encodingTag:
getTableDirEntry:from:offset:
Find the table named tagString in fontData and return a table directory entry for it.
parseTTCHeaderFrom:
processCharMap:
Process the given character map
processCharacterMappingTable:
Read the font's character to glyph index mapping table.
If an appropriate mapping can be found then return an association
with the format identifier and the contents of the table
readFrom:
Read the raw font byte data
readFrom:fromOffset:at:
Search the tables required to build the font
readTTFFrom:
Read the raw font byte data
TTCFontSet
A TTCFontSet is xxxxxxxxx.
Instance Variables
fontArray: <Object>
foregroundColor: <Object>
name: <Object>
fontArray
- xxxxx
foregroundColor
- xxxxx
name
- xxxxx
ascent
ascentOf:
depth
descent
descentKern
descentOf:
discardDefault
displayString:on:from:to:at:kern:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayString:on:from:to:at:kern:baselineY:
Draw the given string from startIndex to stopIndex
at aPoint on the (already prepared) display context.
displayStringR2L:on:from:to:at:kern:
emphasis
emphasized:
familyName
Answer the name to be used as a key in the TextConstants dictionary.
familyName:pointSize:
familySizeFace
fontArray
glyphInfoOf:into:
height
Answer the height of the receiver, total of maximum extents of
characters above and below the baseline.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeWithFontArray:
installOn:
installOn:foregroundColor:backgroundColor:
Install the receiver on the given DisplayContext (either BitBlt or Canvas) for further drawing operations.
isFontSet
isTTCFont
lineGrid
Answer the relative space between lines
maxAsciiFor:
newFontArray:
newTextStyleFromTT:
newTextStyleFromTTFile:
objectForDataStream:
I am about to be written on an object file. Write a
reference to a known FontSet in the other system instead.
pointSize
pointSizes
questionGlyphInfoInto:
register:at:
registry
removeStyleName:
setDefault
textStyle
ttcDescription
unregister:
widthOf:
Return the width of the given character
TextConverter
The abstract class for all different type of text converters. nextFromStream: and nextPut:toStream: are the public accessible methods. If you are going to make a subclass for a stateful text conversion, you should override restoreStateOf:with: and saveStateOf: along the line of CompoundTextConverter.
allEncodingNames
convertFromSystemString:
convertToSystemString:
default
defaultConverterClassForEncoding:
defaultSystemConverter
emitSequenceToResetStateIfNeededOn:
encodingNames
newForEncoding:
nextFromStream:
nextPut:toStream:
restoreStateOf:with:
saveStateOf:
TranslatedReceiverFinder
A TranslatedReceiverFinder is xxxxxxxxx.
Instance Variables
makeJapaneseTranslationFile
searchBlockNode:addTo:
searchMessageNode:addTo:
searchMethodNode:addTo:
searchReturnNode:addTo:
senders
UCSTable
This class represents the Unicode conversion table from/to the domestic encodings and Unicode.
gb2312Table
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeGB2312Table
initializeJISX0208Table
initializeKSX1001Table
initializeLatin1Table
jisx0208Table
ksx1001Table
latin1Table
UTF16TextConverter
Text converter for UTF-16. It supports the endianness and byte order mark.
charFromStream:withFirst:
encodingNames
next16BitValue:toStream:
nextFromStream:
nextPut:toStream:
useByteOrderMark
useByteOrderMark:
useLittleEndian
useLittleEndian:
UTF8DecomposedTextConverter
An UTF8DecomposedTextConverter converts from decomposed UTF8 using the UnicodeCompositionStream.
Instance Variables
encodingNames
nextFromStream:
nextPut:toStream:
we don't decompose for now
UTF8TextConverter
Text converter for UTF-8. Since the BOM is used to distinguish the MacRoman code and UTF-8 code, BOM is written for UTF-8 by #writeBOMOn: which is called by client.
encodingNames
errorMalformedInput
leadingChar
nextFromStream:
nextPut:toStream:
writeBOMOn:
Unicode
This class holds the entry points for the utility functions around characters.
blocks320Comment
blocks320Comment2
charFromUnicode:
compoundTextFinalChar
compoundTextSequence
digitValue:
generalCategory
generalCategoryComment
initialize
Subclasses should redefine this method to perform initializations on instance creation
isCharset
isDigit:
isJapanese:
isKorean:
isLetter:
isLowercase:
isSimplifiedChinese:
isTraditionalChinese:
isUnifiedKanji:
isUppercase:
leadingChar
parseUnicodeDataFrom:
scanSelector
value:
X11Encoding
A X11Encoding is xxxxxxxxx.
Instance Variables
encoding
getEncoding
getLocaleEncoding
getPathEnc
getTextEnc
getXWinEnc
requestUTF8
requestUTF8:
setEncoding:
setEncodingToLocale
setPathEnc:
setPathEncToLocale
setTextEnc:
setTextEncToLocale
setXWinEnc:
setXWinEncToLocale
useEncoding:
useLocaleEncoding
XTableForFixedFont
A XTableForFixedFont is xxxxxxxxx.
Instance Variables
maxCode: <Object>
width: <Object>
maxCode
- xxxxx
width
- xxxxx
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
maxAscii:
maxCode
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.
width
width:
XTableForUnicodeFont
A XTableForUnicodeFont is xxxxxxxxx.
Instance Variables
ranges: <Object>
xTables: <Object>
ranges
- xxxxx
xTables
- xxxxx
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
ranges:
size
Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.