Git Product home page Git Product logo

Comments (4)

ShellWen avatar ShellWen commented on August 12, 2024

同问,几个月过去了..

from zi2zi-pytorch.

889098 avatar 889098 commented on August 12, 2024

好像并没有直接生成字体,只是生成了图片,需要再导入fontcreator、fontforge等软件制作字体

from zi2zi-pytorch.

RongXueE avatar RongXueE commented on August 12, 2024

如题,如何存储为新的ttf字体?

同问,几个月过去了..

您好,我在跑这个代码的预处理阶段出现了以下的问题:
python font2img.py --src_font=src.ttf --dst_font=trg.otf --charset=CN --sample_count=1000 --sample_dir=dir --label=0 --filter --shuffle --mode=font2font
Traceback (most recent call last):
File "font2img.py", line 340, in
args.sample_count, args.sample_dir, args.label, args.filter)
File "font2img.py", line 138, in font2font
src_font = ImageFont.truetype(src, size=char_size)
File "/root/miniconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 976, in truetype
return freetype(font)
File "/root/miniconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 973, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/root/miniconda3/lib/python3.7/site-packages/PIL/ImageFont.py", line 250, in init
font, size, index, encoding, layout_engine=layout_engine
OSError: cannot open resource

想问一下这个--src_font=src.ttf --dst_font=trg.otf这两个参数的设置需要修改吗?期待您的回复

from zi2zi-pytorch.

zombieMaybeLikeCake avatar zombieMaybeLikeCake commented on August 12, 2024

可能是--charset=CN出現問題 你必須創一個.txt檔裡面是dst_font有支援到的字 --charset=你創的.txt檔名

from zi2zi-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.