How to use one Font file with multiple style Weights?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
aeos
Prole
Posts: 3
Joined: Tue Mar 21, 2023 3:42 pm

How to use one Font file with multiple style Weights?

Post by aeos »

I want use the Material Symbols Outlined from Google Fonts site, but the font file sended is one file with multiple style weights, outlined and fill style.

I need use the weight 100, but the Löve sets only Normal style (400)

i try it

Code: Select all

local http = require("socket.http")
function love.load()
  fontfile = http.request("https://fonts.gstatic.com/s/materialsymbolsoutlined/v121/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2")
  fontfile = love.filesystem.newFileData(fontfile, "material.woff2")
  size = 48
  fontfile=love.graphics.setNewFont(fontfile, size )
end
function love.draw()
  love.graphics.setFont( fontfile )
  love.graphics.print("Teste WOFF2",0,0)
end
How i do it?
Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests