Gtk.FontSelection.prototype.get_font_name

function get_font_name():String {
    // Gjs wrapper for gtk_font_selection_get_font_name()
}

Gets the currently-selected font name.

Note that this can be a different string than what you set with Gtk.set_font_name, as the font selection widget may normalize font names and thus return a string with a different structure. For example, "Helvetica Italic Bold 12" could be normalized to "Helvetica Bold Italic 12". Use Pango.equal if you want to compare two font descriptions.

Returns

A string with the name of the current font, or null if no font is selected. You must free this string with GLib.free.