Skip to content

Generate PDF pages to practice writing Mandarin ideograms!

License

Notifications You must be signed in to change notification settings

manoel0810/Chinese-Papper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Criar páginas para o estudo/prática da escrita dos ideogramas do mandarim.

How to use:

  1. Download the reportlab:
     pip install reportlab
  2. Choose your ideogram
  3. Set your ideogram on program main intrance
    generate_pdf('不') # More than one is possible. Adjust as you feel better
  4. Define other properties, such as rectangle size, font size, font style using the settings properties:
    # Registrar fontes que serão usadas (mandarim): --------
    font_name = 'mandarim'
    font_path = 'Fonts/NotoSerifCJKsc-Regular.ttf'
    font_size = 24
    pdfmetrics.registerFont(TTFont(font_name, font_path)) # you should not modify this line ;)
    # ------------------------------------------------------
    
    # Configurações de leyout ------------------------------
    file_name   = 'model.pdf'
    rect_size   = 60                        #dots
    left_margin = 10                        #dots
    top_margin  = rect_size + left_margin   #dots
    # ------------------------------------------------------
  5. Execute the python file

Warning 🐞: Maybe (I've sure) there some bugs that I might ain't fix. In especial with the page margin calcules :)

About

Generate PDF pages to practice writing Mandarin ideograms!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages