Skip to content

I have an issue with upcean.fonts #11

@WHRM1

Description

@WHRM1

Hello,

I have an issue with upcean.fonts when I try to use validate_create_barcode.

In fact it looks like to don't recognized the fontpathocra in my laptop.
This is my error code :

File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\upcean\encode\barcode.py", line 95, in validate_create_ean13_barcode
   return create_ean13_barcode(upc,outfile,resize,hideinfo,barheight,barwidth,textxy,barcolor,imageoutlib);
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\upcean\encode\ean13.py", line 396, in create_ean13_barcode
   drawColorText(upc_img, 10 * int(resize * barwidth[1]), (2 + (2 * (int(resize) - 1))) * barwidth[0], cairo_addon_fix + (barheight[0] + (barheight[0] * (int(resize) - 1)) + pil_addon_fix) + (textxy[0] * int(resize)), upc_matches[0], barcolor[1], "ocrb", imageoutlib);
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\upcean\encode\predraw.py", line 122, in drawColorText
   return upcean.encode.prepil.drawColorText( ctx, size, x, y, text, color, ftype );
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\upcean\encode\prepil.py", line 58, in drawColorText
   font = ImageFont.truetype(fontpathocrb, size);
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\PIL\ImageFont.py", line 996, in truetype
   return freetype(font)
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\PIL\ImageFont.py", line 993, in freetype
   return FreeTypeFont(font, size, index, encoding, layout_engine)
 File "C:\Users\D001919\AppData\Roaming\Python\Python39\site-packages\PIL\ImageFont.py", line 248, in __init__
   self.font = core.getfont(
OSError: unknown file format

@KazukiPrzyborowski do you have any idea to fix this problem ? I already install and uninstall the PIL and Pillow packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions