| 324 | } |
| 325 | |
| 326 | HBFont Harfbuzz::createSubFont(const HBFont& mainFont, SkFont* font) { |
| 327 | // Creating a sub font means that non-available functions |
| 328 | // are found from the parent. |
| 329 | HBFont hbFont(hb_font_create_sub_font(mainFont.get())); |
| 330 | if (hbFont.get() == nullptr) { |
| 331 | return HBFont(nullptr); |
| 332 | } |
| 333 | |
| 334 | hb_font_set_funcs(hbFont.get(), skhbGetFontFuncs(), font, nullptr); |
| 335 | int scale = sskhbPosition(font->getSize()); |
| 336 | hb_font_set_scale(hbFont.get(), scale, scale); |
| 337 | |
| 338 | return hbFont; |
| 339 | } |
| 340 | |
| 341 | }; // namespace snap::drawing |
nothing calls this directly
no test coverage detected