The Font Object =============== .. class:: Font An Excel "font" contains the details of not only what is normally considered a font, but also several other display attributes. Items correspond to those in the Excel UI's Format/Cells/Font tab. - *New in version 0.6.1* .. attribute:: Font.bold 1 = Characters are bold. Redundant; see "weight" attribute. .. attribute:: Font.character_set ===== ================================= Value Character Set ===== ================================= 0 ANSI Latin 1 System default 2 Symbol 77 Apple Roman 128 ANSI Japanese Shift-JIS 129 ANSI Korean (Hangul) 130 ANSI Korean (Johab) 134 ANSI Chinese Simplified GBK 136 ANSI Chinese Traditional BIG5 161 ANSI Greek 162 ANSI Turkish 163 ANSI Vietnamese 177 ANSI Hebrew 178 ANSI Arabic 186 ANSI Baltic 204 ANSI Cyrillic 222 ANSI Thai 238 ANSI Latin II (Central European) 255 OEM Latin I ===== ================================= .. attribute:: Font.colour_index An explanation of "colour index" is given in the Formatting section at the start of this document. .. attribute:: Font.escapement 1 = Superscript, 2 = Subscript. .. attribute:: Font.family ===== =========================================================== Value Famliy ===== =========================================================== 0 None (unknown or don't care) 1 Roman (variable width, serifed) 2 Swiss (variable width, sans-serifed) 3 Modern (fixed width, serifed or sans-serifed) 4 Script (cursive) 5 Decorative (specialised, for example Old English, Fraktur) ===== =========================================================== .. attribute:: Font.font_index The 0-based index used to refer to this Font() instance. Note that index 4 is never used; xlrd supplies a dummy place-holder. .. attribute:: Font.height Height of the font (in twips). A twip = 1/20 of a point. .. attribute:: Font.italic Characters are italic .. attribute:: Font.name The name of the font. Example: "Arial" .. attribute:: Font.outline 1 = Font is outline style (Macintosh only) .. attribute:: Font.shadow 1 = Font is shadow style (Macintosh only) .. attribute:: Font.struck_out 1 = Characters are struck out. .. attribute:: Font.underline_type ============ ================== Value Underline Type ============ ================== 0 None 1 Single 0x21 (33) Single accounting 2 Double 0x22 (34) Double accounting ============ ================== .. attribute:: Font.underlined 1 = Characters are underlined. Redundant; see "underline_type" attribute. .. attribute:: Font.weight Font weight (100-1000). Standard values are 400 for normal text and 700 for bold text.