Skip to main content
Module

x/denops_std/function/mod.ts>getfontname

📚 Standard module for denops.vim
Go to Latest
function getfontname
import { getfontname } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Without an argument returns the name of the normal font being used. Like what is used for the Normal highlight group hl-Normal. With an argument a check is done whether String {name} is a valid font name. If not then an empty string is returned. Otherwise the actual font name is returned, or {name} if the GUI does not support obtaining the real name. Only works when the GUI is running, thus not in your vimrc or gvimrc file. Use the GUIEnter autocommand to use this function just after the GUI has started. Note that the GTK GUI accepts any font name, thus checking for a valid name does not work.

Parameters

denops: Denops
optional
name: unknown

Returns

Promise<string>