MCPcopy Create free account
hub / github.com/GNOME/gjs / selectFontFace_func

Function selectFontFace_func

modules/cairo-context.cpp:645–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645GJS_JSAPI_RETURN_CONVENTION
646static 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
666GJS_JSAPI_RETURN_CONVENTION
667static bool popGroup_func(JSContext* cx, unsigned argc, JS::Value* vp) {

Callers

nothing calls this directly

Calls 3

gjs_parse_call_argsFunction · 0.85
gjs_cairo_check_statusFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected