| 115 | } |
| 116 | int GetProfilePictureSize(); |
| 117 | int MdLineHeight(DrawingContext* context, int styleFlags) |
| 118 | { |
| 119 | int fontId = MdDetermineFontID(styleFlags); |
| 120 | if (context->m_cachedHeights[fontId]) |
| 121 | return context->m_cachedHeights[fontId]; |
| 122 | |
| 123 | HDC hdc = context->m_hdc; |
| 124 | HFONT font = MdGetFontByID(fontId); |
| 125 | HGDIOBJ old = SelectObject(hdc, font); |
| 126 | TEXTMETRIC tm{}; |
| 127 | GetTextMetrics(context->m_hdc, &tm); |
| 128 | SelectObject(hdc, old); |
| 129 | int ht = tm.tmHeight; |
| 130 | context->m_cachedHeights[fontId] = ht; |
| 131 | return ht; |
| 132 | } |
| 133 | |
| 134 | int MdSpaceWidth(DrawingContext* context, int styleFlags) |
| 135 | { |
no test coverage detected