Mercurial > projects > mde
comparison mde/font/font.d @ 98:49e7cfed4b34
All types of Option have been converted to use ValueContent classes, and their values can be displayed.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Wed, 12 Nov 2008 13:18:51 +0000 |
parents | 30470bc19ca4 |
children | 0ea4a3e651ae |
comparison
equal
deleted
inserted
replaced
97:30470bc19ca4 | 98:49e7cfed4b34 |
---|---|
69 logger.info ("The only tested version of freetype is 2.3.5"); | 69 logger.info ("The only tested version of freetype is 2.3.5"); |
70 } | 70 } |
71 | 71 |
72 // Set LCD filtering method if LCD rendering is enabled. | 72 // Set LCD filtering method if LCD rendering is enabled. |
73 const RMF = FT_LOAD_TARGET_LCD | FT_LOAD_TARGET_LCD_V; | 73 const RMF = FT_LOAD_TARGET_LCD | FT_LOAD_TARGET_LCD_V; |
74 if (fontOpts.renderMode & RMF && | 74 if (fontOpts.renderMode() & RMF && |
75 FT_Library_SetLcdFilter(library, cast(FT_LcdFilter)fontOpts.lcdFilter)) { | 75 FT_Library_SetLcdFilter(library, cast(FT_LcdFilter)fontOpts.lcdFilter())) { |
76 /* An error occurred, presumably because LCD rendering support | 76 /* An error occurred, presumably because LCD rendering support |
77 * is not compiled into the library. */ | 77 * is not compiled into the library. */ |
78 logger.warn ("Bad/unsupported LCD filter option; disabling LCD font rendering."); | 78 logger.warn ("Bad/unsupported LCD filter option; disabling LCD font rendering."); |
79 logger.warn ("Your FreeType 2 library may be compiled without support for LCD/sub-pixel rendering."); | 79 logger.warn ("Your FreeType 2 library may be compiled without support for LCD/sub-pixel rendering."); |
80 | 80 |
81 // Reset the default filter (in case an invalid value was set in config files). | 81 // Reset the default filter (in case an invalid value was set in config files). |
82 fontOpts.set!(int) ("lcdFilter", FT_LcdFilter.FT_LCD_FILTER_DEFAULT); | 82 fontOpts.lcdFilter = FT_LcdFilter.FT_LCD_FILTER_DEFAULT; |
83 | 83 |
84 /* If no support for LCD filtering, then LCD rendering only emulates NORMAL with 3 | 84 /* If no support for LCD filtering, then LCD rendering only emulates NORMAL with 3 |
85 * times wider glyphs. So disable and save the extra work. */ | 85 * times wider glyphs. So disable and save the extra work. */ |
86 fontOpts.set!(int) ("renderMode", FT_LOAD_TARGET_NORMAL); | 86 fontOpts.renderMode = FT_LOAD_TARGET_NORMAL; |
87 } | 87 } |
88 | 88 |
89 /* Load font settings | 89 /* Load font settings |
90 * | 90 * |
91 * Each mergetag section corresponds to a font; each is loaded whether used or not | 91 * Each mergetag section corresponds to a font; each is loaded whether used or not |