Text
Text has two different components. The first is the content (the actual characters contained in the text string). The content typically consists of ASCII or Unicode characters entered in one of several ways:
Directly from the keyboard.
From the keyboard using the Alt key and a four-digit ASCII or Unicode decimal value.
Programmatically. (In C#, cast an ASCII or Unicode value to a character type [
(char)n, wherenis a decimal ASCII or Unicode value] or, in VB.NET, use a function such asChr( ))
The second component of text is the format or appearance. This component is defined by the font, which dictates how the characters look. There are many different fonts, such as Times New Roman and Arial. In addition, most fonts can have style attributes applied, such as bold or italic.
Tip
Text and fonts are covered thoroughly in Chapter 9.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access