bugSkencil - Bugs: bug #4736, wmf/cgm export can't do text along...

 
 

bug #4736: wmf/cgm export can't do text along a path

Submitted by:  None
Submitted on:  Wed 13 Aug 2003 09:44:41 PM UTC  
 
Category: NoneSeverity: 2,5
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: 0.6.x

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 28 May 2004 03:52:47 PM UTC, comment #9:

Fixed in 0.6.16.

Bernhard Reiter <bernhard>
Project Administrator
Sat 29 Nov 2003 10:06:50 PM UTC, comment #8:

I've applied both cgmsave.patch and wmfsaver.patch with a slight mofication: The line_pattern is always set to EmptyPattern to make sure that the bezier curves don't have an outline just as the text drawn by sketch itself.

Normal text objects should also never be written with an outline. Both cgmsaver and wmfsaver currently do this, though, and should be fixed.

Bernhard Herzog <bh>
Project Administrator
Mon 24 Nov 2003 09:23:07 PM UTC, comment #7:

I can confirm that the two patches apply to 0.6.16pre2
and also seem to solve the problems.

Bernhard Reiter <bernhard>
Project Administrator
Thu 18 Sep 2003 04:23:51 PM UTC, comment #6:

Now that I've thought about it a bit more, I've come to the conclusion that it would be better for now to follow the lead of the pdfgensaver and handle the transformations of the individual letters in the export filters.

See the PDFGenSaver.path_text method in Plugins/Filters/pdfgensaver.py for how this works in principle.

Bernhard Herzog <bh>
Project Administrator
Wed 17 Sep 2003 05:16:58 PM UTC, comment #5:

The rotated letters are due to applying self.trafo to base_trafo. self.trafo is already accounted for in self.trafos. I'll fix that myself.

In some ways this is a bug in wmfsaver, too. The is_curve attribute of the InternalPathText objects is false, so the code should not expect that the Paths method is defined.

Bernhard Herzog <bh>
Project Administrator
Wed 10 Sep 2003 12:32:29 PM UTC, comment #4:

Yes, this is another significant improvment.

There seem to be another minor problem
with some arcs depending on the direction itself.
E.g. look at the left ones in *bug.sk, the letters are
turned 90 degress. The right arc is fine.

Bernhard Reiter <bernhard>
Project Administrator
Wed 10 Sep 2003 09:58:07 AM UTC, comment #3:

There is a another problem when the text is longer than
the path and some characters do not get displayed.
Trying to export this gives an error message like:

Traceback (most recent call last):
File "./Sketch/UI/command.py", line 58, in Invoke
File "./Sketch/UI/mainwindow.py", line 245, in SaveToFileInteractive
File "./Sketch/UI/mainwindow.py", line 287, in SaveToFile
File "./Sketch/Base/plugins.py", line 211, in _call_
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 460, in save
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 447, in SaveDocument
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 365, in SaveLayers
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 352, in SaveObjects
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 358, in SaveObjects
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 347, in Text
File "./sketch-0.6.16pre2+/Sketch/Graphics/text.py", line 745, in Paths
trafo = trafos[i](base_trafo(Translation(pos[i])))
IndexError: list index out of range

Bernhard Reiter <bernhard>
Project Administrator
Wed 10 Sep 2003 09:33:25 AM UTC, comment #2:

The patch applies to sketch-0.6.16pre2.
Some files do not dump anymore, so the patch
is a step forward.
But the wmf result does not display correctly,
it does not align correctly.

See my attached test sketch file.

Bernhard Reiter <bernhard>
Project Administrator
Tue 19 Aug 2003 07:04:38 PM UTC, comment #1:

For the records: I've found that bug. :)

Bernhard Reiter <bernhard>
Project Administrator
Wed 13 Aug 2003 09:44:41 PM UTC, original submission:

sketch-0.6.16pre2:
Make a curve and a text.
Select both and use "Effects -> Create Path Text".

Try "Save As" in wmf format.
There will be an error message and the wmf file is broken:

Traceback (most recent call last):
File "./Sketch/UI/command.py", line 58, in Invoke
apply(self.get_method(self.command), self.args + args)
File "./Sketch/UI/mainwindow.py", line 245, in SaveToFileInteractive
self.SaveToFile(filename, fileformat, compressed, compressed_file)
File "./Sketch/UI/mainwindow.py", line 287, in SaveToFile
saver(self.document, filename)
File "./Sketch/Base/plugins.py", line 211, in _call_
module.save(document, file, filename, options)
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 460, in save
saver.SaveDocument(document)
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 447, in SaveDocument
self.SaveLayers(doc.Layers())
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 365, in SaveLayers
self.SaveObjects(layer.GetObjects())
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 352, in SaveObjects
self.SaveObjects(object.GetObjects())
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 358, in SaveObjects
self.Text(object)
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 347, in Text
self.PolyBezier(object.Paths(), object.Properties())
File "./Sketch/../Plugins/Filters/wmfsaver.py", line 255, in PolyBezier
if len(Paths) == 1:
TypeError: len() of unsized object

Another different error message on a similiar file:
Traceback (most recent call last):
File "/usr/local/lib/sketch-0.6.16pre1/Sketch/UI/command.py", line 58, in Invoke
File "/usr/local/lib/sketch-0.6.16pre1/Sketch/UI/mainwindow.py", line 245, in SaveToFileInteractive
File "/usr/local/lib/sketch-0.6.16pre1/Sketch/UI/mainwindow.py", line 287, in SaveToFile
File "/usr/local/lib/sketch-0.6.16pre1/Sketch/Base/plugins.py", line 211, in _call_
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 460, in save
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 447, in SaveDocument
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 365, in SaveLayers
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 352, in SaveObjects
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 358, in SaveObjects
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 347, in Text
File "/usr/local/lib/sketch-0.6.16pre1/Plugins/Filters/wmfsaver.py", line 255, in PolyBezier
TypeError: len() of unsized object

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #654:  sketch-wmf-path-bug2.sk added by bernhard (448B - application/octet-stream - Path-text with overlong text)
file #653:  sketch-wmf-path-bug.sk added by bernhard (2KiB - application/octet-stream - Text along a path export position problems.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 28 May 2004 03:52:47 PM UTCbernhardStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Wed 10 Sep 2003 09:33:25 AM UTCbernhardSummarywmf export can't do text along a path=>
Tue 19 Aug 2003 07:04:38 PM UTCbernhardSeverity3 - Normal=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1