Glyph cursors are created by using a character from an application-specified font as a cursor. To create a glyph cursor, the application must have loaded a CgFont. Then a cursor object is created by sending the createGlyphCursor:sourceChar:maskChar: or createGlyphCursor:sourceChar:maskChar:foregroundColor:backgroundColor: message to the CgFont object (the "source font"). In the following example, the same font and character are used for the mask font and the mask character. The following code creates and displays the @ sign as a cursor.
|