For People who wants to use Fonts in their plugin



Since XD Doesn’t support font api to check which fonts are installed
i want to use some how the fonts in system api until API is released i want to store fonts names as Array and use them
First i started testing node module font-list but due to XD API doesn’t support package.json model to load module i have to change every file in library this doesn’t work after some modules are core modules so there is no pointing to core ones in anyway so i got an idea of storing fonts in an array and based on platform we can managed to use system pre-installed fonts for now atleast it is a workaround
until fonts api is released

to get what platform we are working on see this

At present I will give Fonts in windows 10 these are pre-installed fonts on windows 10

const winFonts = [
    "Agency FB",
    "Arial Rounded MT Bold",
    "Baskerville Old Face",
    "Bauhaus 93",
    "Bell MT",
    "Berlin Sans FB",
    "Bernard MT Condensed",
    "Blackadder ITC",
    "Bodoni MT Poster Compressed Light",
    "Bodoni MT",
    "Book Antiqua",
    "Bookman Old Style",
    "Bookshelf Symbol 7",
    "Bradley Hand ITC",
    "Britannic Bold",
    "Brush Script MT Italic",
    "Californian FB",
    "Calisto MT",
    "Cambria Math",
    "Century Gothic",
    "Century Schoolbook",
    "Colonna MT",
    "Comic Sans MS",
    "Cooper Black",
    "Copperplate Gothic",
    "Courier New",
    "Curlz MT",
    "Edwardian Script ITC",
    "Engravers MT Expanded Medium",
    "Eras ITC",
    "Felix Titling",
    "Footlight MT Light",
    "Franklin Gothic Book",
    "Franklin Gothic",
    "Freestyle Script",
    "French Script MT",
    "Gill Sans MT",
    "Gill Sans",
    "Gloucester MT Extra Condensed",
    "Goudy Old Style",
    "Goudy Stout",
    "Harlow Solid Semi Expanded Italic",
    "High Tower Text",
    "HoloLens MDL2 Assets",
    "Imprint MT Shadow",
    "Informal Roman",
    "Ink Free",
    "Javanese Text",
    "Juice ITC",
    "Kristen ITC",
    "Kunstler Script",
    "Latin Wide",
    "Leelawadee UI",
    "Lucida Bright",
    "Lucida Calligraphy Italic",
    "Lucida Console",
    "Lucida Fax",
    "Lucida Handwriting Italic",
    "Lucida Sans Typewriter",
    "Lucida Sans Unicode",
    "Lucida Sans",
    "MS Gothic",
    "MS Outlook",
    "MS PGothic",
    "MS Reference Sans Serif",
    "MS Reference Specialty",
    "MS Sans Serif",
    "MS Serif",
    "MS UI Gothic",
    "MT Extra",
    "MV Boli",
    "Magneto Bold",
    "Maiandra GD",
    "Malgun Gothic",
    "Matura MT Script Capitals",
    "Microsoft Himalaya",
    "Microsoft JhengHei UI",
    "Microsoft JhengHei",
    "Microsoft New Tai Lue",
    "Microsoft PhagsPa",
    "Microsoft Sans Serif",
    "Microsoft Tai Le",
    "Microsoft Uighur",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "Microsoft Yi Baiti",
    "Mongolian Baiti",
    "Monotype Corsiva Italic",
    "Myanmar Text",
    "Niagara Engraved",
    "Niagara Solid",
    "Nirmala UI",
    "OCR A Extended",
    "Old English Text MT",
    "Palace Script MT Italic",
    "Palatino Linotype",
    "Perpetua Titling MT",
    "Poor Richard",
    "Rage Italic",
    "Script MT Bold",
    "Segoe MDL2 Assets",
    "Segoe Print",
    "Segoe Script",
    "Segoe UI Emoji",
    "Segoe UI Historic",
    "Segoe UI Symbol",
    "Segoe UI",
    "Showcard Gothic",
    "Sitka Banner",
    "Sitka Display",
    "Sitka Heading",
    "Sitka Small",
    "Sitka Subheading",
    "Sitka Text",
    "Small Fonts",
    "Snap ITC",
    "Source Code Pro",
    "System Bold",
    "Tempus Sans ITC",
    "Times New Roman",
    "Trebuchet MS",
    "Tw Cen MT",
    "Viner Hand ITC",
    "Vivaldi Italic",
    "Vladimir Script",
    "Wingdings 2",
    "Wingdings 3",
    "Yu Gothic UI",
    "Yu Gothic"

const winFontsC = [

I had opened a topic on mac fonts here after someone replyed with mac preinstalled fonts i will add mac fonts also


I remember at one point seeing a list somewhere that had common fonts between Win and Mac. Of course, with both a Mac and Win array a common fonts list can be generated.