[Oberon] Support for "Bold Italic" in AosOTFonts

Yaroslav Romanchenko tobject at bk.ru
Wed Dec 20 22:00:43 MET 2006


Before I wrote in a theme "[Oberon] Bug in AosOTFonts module":
"I already 2 weeks unsuccessfully try to be registered in the Oberon mailing list, so I had to send a letter directly.
I found an bug in the AosOTFonts module, resulting in TRAP at an attempt to pass a parameter "style" to the procedure Make.
It is needed to change definition of variable style from "style: ARRAY 1 OF CHAR" to "style: ARRAY 2 OF CHAR", that a variable could adopt the character of style and character 0X."

The further study of procedure Make of the module AosOTFonts showed that in the case of pointing of size of font of "8" the incorrect names of fonts turn out as a result, because verification on "temp" is alphabetic character in the area of code is not done:

				IF (Utilities.Length(temp) = 1) THEN
					style[0] := temp[0];
					sr.SkipWhitespace(); sr.Token(temp);	
				ELSE 
					style[0] := 0X;
				END;

Further caused the surprise, why it is possible to use only one character for pointing of style of "b" or "i", if as I correctly understood in BB it is possible to use the "Bold Italic" style and it requires suffix of "bi" in the file name of raster font.

Taking into account all I noted above I see a necessity to make alterations in the AosOTFonts module.

Piece of code "style: ARRAY 1 OF CHAR;"
to replace on "style: ARRAY 3 OF CHAR;",

and piece
"				IF (Utilities.Length(temp) = 1) THEN
					style[0] := temp[0];
					sr.SkipWhitespace(); sr.Token(temp);	
				ELSE 
					style[0] := 0X;
				END;"

to replace on
"				IF ((Utilities.Length(temp) = 1)
				   OR (Utilities.Length(temp) = 2))&
				   ~IsNumber(temp) THEN
					COPY(temp, style);
					sr.SkipWhitespace(); sr.Token(temp);	
				ELSE 
					style[0] := 0X;
				END;"

And what means suffix of "m" in the file name of raster font?
Monospace?

---
Cheers, SAGE
http://sage.h15.ru/


More information about the Oberon mailing list