| 643 | } |
| 644 | |
| 645 | GJS_JSAPI_RETURN_CONVENTION |
| 646 | static bool selectFontFace_func(JSContext* cx, unsigned argc, JS::Value* vp) { |
| 647 | GJS_CAIRO_CONTEXT_GET_PRIV_CR_CHECKED(cx, argc, vp, argv, obj); |
| 648 | |
| 649 | JS::UniqueChars family; |
| 650 | cairo_font_slant_t slant; |
| 651 | cairo_font_weight_t weight; |
| 652 | |
| 653 | if (!gjs_parse_call_args(cx, "selectFontFace", argv, "sii", "family", |
| 654 | &family, "slant", &slant, "weight", &weight)) |
| 655 | return false; |
| 656 | |
| 657 | cairo_select_font_face(cr, family.get(), slant, weight); |
| 658 | |
| 659 | if (!gjs_cairo_check_status(cx, cairo_status(cr), "context")) |
| 660 | return false; |
| 661 | argv.rval().setUndefined(); |
| 662 | |
| 663 | return true; |
| 664 | } |
| 665 | |
| 666 | GJS_JSAPI_RETURN_CONVENTION |
| 667 | static bool popGroup_func(JSContext* cx, unsigned argc, JS::Value* vp) { |
nothing calls this directly
no test coverage detected