Skip to content

$ fontknife convert tom-thumb.{bdf,png}: ValueError: x1 must be greater than or equal to x0 #4

@Des-Nerger

Description

@Des-Nerger
$ fontknife convert tom-thumb.{bdf,png}
Traceback (most recent call last):
  File "/home/username/.local/bin/fontknife", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/commands/__main__.py", line 361, in main
    font = load_font(source_path, **source_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/formats/__init__.py", line 84, in load_font
    font = reader.load_source(source, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/formats/common/__init__.py", line 243, in load_source
    result = RasterFont(**raw_glyph_data, size_points=font_size, path=actual_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/formats/common/raster_font.py", line 195, in __init__
    self._update_max_tile_size_and_tofu()
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/formats/common/raster_font.py", line 231, in _update_max_tile_size_and_tofu
    self._notdef_glyph = generate_missing_character_core(self._max_tile_bbox[:2])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/lib/python3.12/site-packages/fontknife/formats/common/raster_font.py", line 149, in generate_missing_character_core
    draw.rectangle(rectangle_bbox, outline=color)
  File "/home/username/.local/lib/python3.12/site-packages/PIL/ImageDraw.py", line 296, in rectangle
    self.draw.draw_rectangle(xy, ink, 0, width)
ValueError: x1 must be greater than or equal to x0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions