Load the matching native Windows font. */
| 140 | |
| 141 | /** Load the matching native Windows font. */ |
| 142 | static HFONT HFontFromFont(Font *font) |
| 143 | { |
| 144 | if (font->fc->GetOSHandle() != nullptr) return CreateFontIndirect(reinterpret_cast<PLOGFONT>(const_cast<void *>(font->fc->GetOSHandle()))); |
| 145 | |
| 146 | LOGFONT logfont{}; |
| 147 | logfont.lfHeight = font->fc->GetHeight(); |
| 148 | logfont.lfWeight = FW_NORMAL; |
| 149 | logfont.lfCharSet = DEFAULT_CHARSET; |
| 150 | convert_to_fs(font->fc->GetFontName(), logfont.lfFaceName); |
| 151 | |
| 152 | return CreateFontIndirect(&logfont); |
| 153 | } |
| 154 | |
| 155 | /** Determine the glyph positions for a run. */ |
| 156 | static bool UniscribeShapeRun(const UniscribeParagraphLayoutFactory::CharType *buff, UniscribeRun &range) |
no test coverage detected