Extra Fonts|CPC Computing)Applications Utilitaires Rsx/ligne De Commande
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Dress up your text with four bright new type faces, CHRIS NIXON shows you how

THOSE of you who have seen Microsoft's Gem - Graphics Environment Manager - in action on the Amstrad PC may have been impressed by the variety of on-screen fonts available. In fact Gem has about five typefaces, and these are used in pull-down menus to indicate the status of various system options, file types and so on.

If you entered my letterhead designer from the July 1988 issue of Computing with the Amstrad CPC, you will have seen that I incorporated a similar multi-font facility.

Quite a number of you have written asking about this particular feature, so in response to popular demand I've fished out that section from the machine code, added another frill -underlined text - and made it a standalone utility called Fonts. It will allow you to display on the screen text in one of five typefaces, each generated from the character set built into the machine.

After running the program you will have the five RSXs detailed in Table I. Simply select the font you require, and either type the appropriate RSX name or include it in your program. It should be noted that this facility does not work with text printed at the graphics cursor after using the TAG command. Some fonts, in particular the feint style, are most effective in 40 and 80 column modes. Mode 0 unfortunately shows up feint and italic text as being rather messy, while bold text appears altogether too chunky.

The principle behind the utility is very simple. Inside the lower ROM of your CPC are the definitions of the 255 displayable characters. These are stored as a table containing 255 groups of eight bytes in the same format used by Basic's SYMBOL command. Each byte in a group of eight refers to a horizontal row in the character, and each bit in a byte lights up the corresponding pixel.

Anyone in possession of Soft 968 -Amstrad's firmware guide - has access to all sorts of behind-the-scenes trickery, and Fonts makes heavy use of the firmware's ability to be intercepted, diverted, and generally fiddled about with. Each non-TAG character printed on your monitor is channelled through the jumpblock entry TXT WRITE CHAR at &BDD3. When run, the program diverts this entry to point to its own checking routine. It then installs the RSX commands which have the following effect on any characters passed to TXT WRITE CHAR:

First, a character's eight-byte matrix will be read from the ROM with TXT GET MATRIX, and stored in a buffer for editing. The way in which the buffer contents are then edited depends on which style is in operation.

After editing, character 255 is redefined with the new matrix by means of the firmware call TXT SET MATRIX. It is then sent to the firmware in place of the original character. When a INORMAL is issued, the stored copy of the entry for &BDD3 is replaced, returning control of character printing to the firmware.

The editing process used by Fonts is as follows. If the bold font is active, each of the eight bytes in the buffer is shifted one bit to the right, and superimposed on top of the original byte. This results in every dot in the character being made double-width, creating the bold effect.

Italics are achieved by shifting the top four bytes of each character one bit to the right, effectively slanting the text slightly. Underlining is created by simply making the bottom byte of the new matrix equal to 255 - a line of eight pixels.

  • |BOLD Makes each character pixel double-width.
  • |ITALIC Shifts the top half of each character to the right by one pixel.
  • |FEINT Blanks out alternate character pixels to create a stippled effect.
  • |UNDER Makes the last byte of each character a solid line,
  • |NORMAL Restores the old jumpblock entry for TXT OUTPUT.
Table I: The RSX commands

Creating the feint font is a slightly more complicated process. Each byte in the character is doctored to mask out alternate bits, creating a stippled effect. To ensure proper stippling, the mask used must be inverted for every other byte of the character. In other words the first row is ANDed with &X10101010, and the next row with &X01010101.

And that's it. A simple utility that will add variety and a professional touch to your text.


★ YEAR: 1988


» RSX-Extra  Fonts    LISTINGDATE: 2013-09-15
DL: 29 fois
SIZE: 74Ko
NOTE: 1 page/PDFlib v1.6

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

» Applications » Fractais CPC (Amstrad Magazine)
» Applications » Geca - Gega - Decamob
» Applications » Doodle - Simple Drawing Program (The Amstrad User)
» Applications » Komplexe Zahlenfolgen (CPC Amstrad International)
» Applications » Photo-Sprite/Genephot (CPC Revue)
» Applications » CPC Paint (Amstrad Magazine)


L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 124 millisecondes et consultée 738 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.