piface314 / ygo-fabrica

A project manager for EDOPro card packs.
MIT License
24 stars 4 forks source link

Unable to compose cards due to font issue #11

Open monyarm opened 3 years ago

monyarm commented 3 years ago
ygofab compose -Pall -Eall
Composing "EDOPro" with "NAMEHERE"...
100.0% [################################] 1/1 Done!                  
100.0% [################################] 1/1 Rendering "69140098"...luajit: .../.local/ygofab/modules/share/lua/5.1/vips/voperation.lua:245: unable to call text
text: unable to load font "/home/monyarm/.local/ygofab/res/composer/fonts/values.ttf"

stack traceback:
        [C]: in function 'error'
        .../.local/ygofab/modules/share/lua/5.1/vips/voperation.lua:245: in function 'text'
        ...e/monyarm/.local/ygofab/scripts/composer/type-writer.lua:134: in function 'print'
        ...rm/.local/ygofab/scripts/composer/modes/proxy/shapes.lua:127: in function 'render'
        /home/monyarm/.local/ygofab/scripts/composer/decoder.lua:131: in function 'fun'
        /home/monyarm/.local/ygofab/lib/fun.lua:595: in function 'foldl_call'
        /home/monyarm/.local/ygofab/lib/fun.lua:600: in function 'reduce'
        /home/monyarm/.local/ygofab/scripts/composer/decoder.lua:130: in function 'render'
        /home/monyarm/.local/ygofab/scripts/composer/init.lua:59: in function 'fun'
        /home/monyarm/.local/ygofab/lib/fun.lua:30: in function 'gen_x'
        /home/monyarm/.local/ygofab/lib/fun.lua:790: in function 'totable'
        /home/monyarm/.local/ygofab/scripts/composer/init.lua:60: in function 'render'
        /home/monyarm/.local/ygofab/scripts/composer/init.lua:91: in function 'compose'
        /home/monyarm/.local/ygofab/scripts/compose.lua:21: in function </home/monyarm/.local/ygofab/scripts/compose.lua:7>
        /home/monyarm/.local/ygofab/scripts/ygofab.lua:49: in function 'fn'
        /home/monyarm/.local/ygofab/lib/interpreter.lua:123: in function 'exec'
        /home/monyarm/.local/ygofab/scripts/ygofab.lua:87: in main chunk
        [C]: at 0x55dc4122c2a0

I've checked, the font does exist.

piface314 commented 3 years ago

Hmm if the font does exist, and since I've checked many times and it renders fine here, it seems to be a problem with vips. Which version of vips are you using?

monyarm commented 3 years ago

Vips-8.10.5

On Tue, Mar 23, 2021, 5:36 PM Henrique Santana @.***> wrote:

Hmm if the font does exist, and since I've checked many times and it renders fine here, it seems to be a problem with vips. Which version of vips are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/11#issuecomment-805004123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKTTOY72LQM5PHAGGQ3TFCYPXANCNFSM4ZVNJIZA .

piface314 commented 3 years ago

I really have no clue what's going on then. Try running luajit in interactive mode and copying these lines:

package.path = package.path .. ";/home/monyarm/.local/ygofab/modules/share/lua/5.1/?.lua;/home/monyarm/.local/ygofab/modules/share/lua/5.1/?/init.lua"
vips = require 'vips'
vips.Image.text("Hello, World!", {font = "MatrixBoldSmallCaps 5", fontfile = "/home/monyarm/.local/ygofab/res/composer/fonts/values.ttf", dpi = 300}):write_to_file("text.png")

This is the output I get: text

Tell me if this error happens again in this way.

monyarm commented 3 years ago
> vips.Image.text("Hello, World!", {font = "MatrixBoldSmallCaps 5",
fontfile = "/home/monyarm/.local/ygofab/res/composer/fonts/values.ttf", dpi
= 300}):write_to_file("text.png")
.../.local/ygofab/modules/share/lua/5.1/vips/voperation.lua:245: unable to
call text
text: unable to load font
"/home/monyarm/.local/ygofab/res/composer/fonts/values.ttf"

stack traceback:
       [C]: in function 'error'
       .../.local/ygofab/modules/share/lua/5.1/vips/voperation.lua:245: in
function 'text'
       stdin:1: in main chunk
       [C]: at 0x560b6e1582a0

On Tue, Mar 23, 2021 at 5:51 PM Henrique Santana @.***> wrote:

I really have no clue what's going on then. Try running luajit in interactive mode and copying these lines:

package.path = package.path .. ";/home/monyarm/.local/ygofab/modules/share/lua/5.1/?.lua;/home/monyarm/.local/ygofab/modules/share/lua/5.1/?/init.lua" vips = require 'vips' vips.Image.text("Hello, World!", {font = "MatrixBoldSmallCaps 5", fontfile = "/home/monyarm/.local/ygofab/res/composer/fonts/values.ttf", dpi = 300}):write_to_file("text.png")

This is the output I get: [image: text] https://user-images.githubusercontent.com/22157025/112175727-3d248d80-8bd6-11eb-98d2-e52c6c4a024c.png

Tell me it this error happens again in this way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/11#issuecomment-805015921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKUIXLAQULVS7NZVXLTTFC2HNANCNFSM4ZVNJIZA .

piface314 commented 3 years ago

Check if you can open that font with your default font browser or something like that (just to see if the font itself is ok). If it is, then I would suggest posting that error on libvips issues, since it seems to be something with the library. Maybe when you installed it, it did not get support for .ttf fonts?

monyarm commented 3 years ago

The font loads in other software. I guess it's a vips issue then.

On Tue, Mar 23, 2021, 6:10 PM Henrique Santana @.***> wrote:

Check if you can open that font with your default font browser or something like that (just to see if the font itself is ok). If it is, then I would suggest posting that error on libvips issues https://github.com/libvips/libvips/issues, since it seems to be something with the library. Maybe when you installed it, it did not get support for .ttf fonts?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/11#issuecomment-805031216, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKQVNS6IWECMWOYF2N3TFC4NXANCNFSM4ZVNJIZA .