Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changes

## Version 1.0.4

_2026-03-10_

Change:

- Remove filter of non-ascii characters in `RendererDxf.draw_text()`.
Let this be up to the caller if any filtering is needed.

## Version 1.0.3

_2026-02-24_
Expand Down
6 changes: 0 additions & 6 deletions mpldxf/backend_dxf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

from __future__ import absolute_import, division, unicode_literals
from io import BytesIO, StringIO
import os
import sys
Expand All @@ -49,8 +48,6 @@
FigureManagerBase,
)
from matplotlib.transforms import Affine2D
import matplotlib.transforms as transforms
import matplotlib.collections as mplc
import numpy as np
from shapely import Point
from shapely.geometry import LineString, Polygon
Expand Down Expand Up @@ -818,9 +815,6 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
else:
dxfattribs["color"] = rgb_to_dxf(gc.get_rgb())

s = s.replace("\u2212", "-")
s = s.encode("ascii", "ignore").decode()

if s and len(s) > 0 and s[0] == "$":
pattern = r"\\mathbf\{(.*?)\}"
stripped_text = re.sub(pattern, r"\1", s)
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tool.poetry]
name = "mpldxf"
version = "1.0.3"
version = "1.0.4"
description = "A fork of mpldxf - a matplotlib backend to write DXF drawings. Modified by NGI to handle geotechnical plots"
authors = ["David Kent",
"Jon-Michael Josefsen <jmj@ngi.no>",
"Ingeborg Gjerde <ingeborg.gjerde@ngi.no>"]
"Ingeborg Gjerde <ingeborg.gjerde@ngi.no>",
"Jostein Leira <jostein@leira.net>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/norwegian-geotechnical-institute/mpldxf-NGI"
Expand Down