--- a/DeviceGraphicsContext.st Sun Apr 03 19:22:51 2016 +0100
+++ b/DeviceGraphicsContext.st Wed Apr 13 09:21:42 2016 +0100
@@ -1904,9 +1904,12 @@
^ self
].
- "/ transcode the string into the fonts encoding...
+ "/ transcode the string into the font's encoding...
aString := aStringArg.
fontsEncoding := font encoding.
+
+ "/ This is now obsolete, as we are always using unicode internally.
+ "/ so the next line should be changed to fontsEncoding ~~ #unicode
(characterEncoding ~~ fontsEncoding) ifTrue:[
[
aString := CharacterEncoder encodeString:aString from:characterEncoding into:fontsEncoding.
@@ -3037,6 +3040,9 @@
s := aString.
fontUsed := font onDevice:device.
fontsEncoding := fontUsed encoding.
+
+ "/ This is now obsolete, as we are always using unicode internally.
+ "/ so the next line should be changed to fontsEncoding ~~ #unicode
(characterEncoding ~~ fontsEncoding) ifTrue:[
[
s := CharacterEncoder encodeString:s from:characterEncoding into:fontsEncoding.
@@ -3328,6 +3334,9 @@
s := aString.
fontUsed := font onDevice:device.
fontsEncoding := fontUsed encoding.
+
+ "/ This is now obsolete, as we are always using unicode internally.
+ "/ so the next line should be changed to fontsEncoding ~~ #unicode
(characterEncoding ~~ fontsEncoding) ifTrue:[
[
s := CharacterEncoder encodeString:s from:characterEncoding into:fontsEncoding.
--- a/GraphicsContext.st Sun Apr 03 19:22:51 2016 +0100
+++ b/GraphicsContext.st Wed Apr 13 09:21:42 2016 +0100
@@ -723,10 +723,7 @@
characterEncoding
"returns a symbol describing how the contents is encoded internally.
- For now, this should be the same encoding as my fonts encoding (otherwise, mappings would
- occur when drawing).
- This is (currently) only passed down from the fileBrowser,
- and required when japanese/chinese/korean text is edited.
+ This is now obsolete, as we are always using unicode internally.
(encoding is something like #'iso8859-5' #euc, #sjis, #jis7, #gb, #big5 or #ksc)"
^ characterEncoding
@@ -738,7 +735,8 @@
unicode (of which iso8859-1 is a subset) encoding.
The possibility to change the characterEncoding is provided as
a backward compatibility hook for programs which want to use
- another encoding internally. One such view is the CharacterSetView,
+ another encoding internally.
+ One such view is the CharacterSetView,
which wants to show character as they are actually present in a font."
|encodingSymOrNil|
@@ -2533,6 +2531,8 @@
joinStyle := #miter.
capStyle := #butt.
font := self class defaultFont.
+
+ "/ this is rubbish. we are now always using unicode internaly
characterEncoding := #'iso10646-1'. "/ aka unicode
! !