[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52193] Font choices are ignored when printing
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52193] Font choices are ignored when printing to an image file |
Date: |
Tue, 13 Feb 2018 13:48:14 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #52193 (project octave):
Release: 4.2.1 => dev
_______________________________________________________
Follow-up Comment #21:
I think a reasonable way to obtain svg output, and handle the artifacts, may
be to use a separate program (svg2svg) which just does polygon reconstruction,
and then a separate Qt program to change svg2any_format.
I reviewed octave-svgconvert.cc which was a hodge-podge of C, C++, and Qt
styles (printf as well as std::cerr as well as QDebug). I modified things to
follow Octave coding conventions, but it is still not perfect. It is
attached.
The issue that I encounter with thin hairlines is triggered when the svg file
contains multiple polygons in a row, but they are not necessarily related.
The algorithm in octave-svgconvert.cc is too simple and only checks for
whether the colors of the polygon are the same before trying to merge them.
The attached bar.svg was generated by gl2ps for a stacked bar graph. It has
polygons (rectangles) which are physically separated, but which appear next to
each other in the svg and so are merged. I believe it is necessary to put an
additional check that two polygons to be merged have at least one vertex in
common.
I started writing a polygon reconstruction script in Perl (svg2svg). I've
made good progress. The svg is so simple that regular expressions suffice to
do the processing rather than using a full xml interpreter. But the merging
of polygons is more difficult than I thought and I don't have the time to work
on this just now.
I propose that this bug be a topic that we take up during one of the code
sprints during OctConf 2018 in 4 weeks.
(file #43273, file #43274)
_______________________________________________________
Additional Item Attachment:
File name: octave-svgconvert.cc Size:18 KB
File name: bar.svg Size:12 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52193>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52193] Font choices are ignored when printing to an image file,
Rik <=