include a font with support for Japanese

This commit is contained in:
Kartik K. Agaram 2022-09-10 18:34:44 -07:00
parent c88ddbc3a7
commit 203e8cfeec
2 changed files with 3 additions and 3 deletions

BIN
NotoSansJP-Regular.otf Normal file

Binary file not shown.

View File

@ -176,7 +176,7 @@ function load_settings()
love.window.setPosition(Settings.x, Settings.y, Settings.displayindex)
Font_height = Settings.font_height
Line_height = math.floor(Font_height*1.3)
love.graphics.setFont(love.graphics.newFont(Font_height))
love.graphics.setFont(love.graphics.newFont('NotoSansJP-Regular.otf', Font_height))
Em = App.newText(love.graphics.getFont(), 'm')
Display_settings.column_width = Settings.column_width
for _,column_name in ipairs(Settings.columns) do
@ -190,7 +190,7 @@ end
function initialize_default_settings()
initialize_window_geometry()
love.graphics.setFont(love.graphics.newFont(Font_height))
love.graphics.setFont(love.graphics.newFont('NotoSansJP-Regular.otf', Font_height))
Em = App.newText(love.graphics.getFont(), 'm')
Display_settings.column_width = 40*App.width(Em)
-- initialize surface with a single column
@ -820,7 +820,7 @@ end
function update_font_settings(font_height)
local column_width_in_ems = Display_settings.column_width / App.width(Em)
Font_height = font_height
love.graphics.setFont(love.graphics.newFont(Font_height))
love.graphics.setFont(love.graphics.newFont('NotoSansJP-Regular.otf', Font_height))
Line_height = math.floor(font_height*1.3)
Em = App.newText(love.graphics.getFont(), 'm')
Display_settings.column_width = column_width_in_ems*App.width(Em)