Grx.Font.prototype.get_text_width

function get_text_width(text: String): Number(gint) {
    // Gjs wrapper for grx_font_get_text_width()
}
  

Gets the width of a string using the specified font.

The string must contain valid UTF-8. Check using g_utf8_validate() first if text is from an unknown source.

text

the text

Returns

the width