Skip to content

Many fonts can not be used #236

@lidannyapple

Description

@lidannyapple

Many fonts can not be used, even the official font DejaVuSansMono.ttf, change a folder can not be used, only some of the fonts are more generic fonts can be used. The DejaVuSansMono.ttf. font in the following code does not work, this font is confirmed to have been installed in the system fonts folder, in other software such as WORD can be used.
I have tried many fonts, some can be used, some can not be used, the barcode can not be made or displayed.

dannyli@126.com

barcode.save(barcode_image_path, options={
'write_text': True,
'quiet_zone': 0.5,
'text_distance': 3,
'module_height': 5.0,
'module_width': 0.2,
'background': "white",
'foreground': "black",
'font_size': 7,
'dpi': 1200,
'margin_bottom': -1,
'margin_top': 0.5,
'guard_height_factor': 1.1,
'center_text': True,
'text_line_distance': 1,
'human': "",#"Human Readable Text",
'text':"", #"Custom Text",
'font_path': os.path.join("C:\windows", "fonts", "DejaVuSansMono.ttf"),
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions