| 66 | } |
| 67 | |
| 68 | void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs) { |
| 69 | PLATFORM_ASSERT(fs.fontName); |
| 70 | sizeZoomed = fs.size + zoomLevel * SC_FONT_SIZE_MULTIPLIER; |
| 71 | if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 |
| 72 | sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; |
| 73 | |
| 74 | float deviceHeight = surface.DeviceHeightFont(sizeZoomed); |
| 75 | FontParameters fp(fs.fontName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, fs.weight, fs.italic, fs.extraFontFlag, technology, fs.characterSet); |
| 76 | font.Create(fp); |
| 77 | |
| 78 | ascent = surface.Ascent(font); |
| 79 | descent = surface.Descent(font); |
| 80 | aveCharWidth = surface.AverageCharWidth(font); |
| 81 | spaceWidth = surface.WidthChar(font, ' '); |
| 82 | } |
| 83 | |
| 84 | ViewStyle::ViewStyle() { |
| 85 | Init(); |
no test coverage detected