Skip to content

Commit

Permalink
use system default font in drawing add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
mozman committed Dec 2, 2023
1 parent f3feea8 commit 9241936
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions notes/pages/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ id:: 6568dc88-ce84-4f46-b490-43768c491a2b
- This may help to process more [[AutoCAD]] files by the [[ezdxf.xref]] module, but can also make DXF docments unreadable for [[AutoCAD]].
- BUGFIX: find [[ProxyGraphic]] in [[ACAD_PROXY_ENTITY]] for any DXF version
- issue [#978](https://github.com/mozman/ezdxf/issues/978)
- CHANGE: use system default font in [[drawing add-on]]
-
- ## Version 1.1.3 - 2023-11-25
id:: 65604fb6-9254-4146-abb1-4e93f6adfddc
Expand Down
5 changes: 5 additions & 0 deletions src/ezdxf/addons/drawing/designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def __init__(self, backend: BackendInterface):
self.backend = backend
self.config = Configuration()
self.pattern_cache: dict[PatternKey, Sequence[float]] = dict()
try: # request default font face
self.default_font_face = fonts.font_manager.get_font_face("")
except fonts.FontNotFoundError: # no default font found
# last resort MonospaceFont which renders only "tofu"
pass
self.clipper = ClippingRect()
self.current_vp_scale = 1.0
self._current_entity_handle: str = ""
Expand Down

0 comments on commit 9241936

Please sign in to comment.