xfig renders differently on screen than in png - Xwindows

This is a discussion on xfig renders differently on screen than in png - Xwindows ; Hi all. I posted this yesterday in comp.windows.x.apps but that newsgroup is a bit quiet. In xfig, I've got a rectangle with text inside that fits exactly in the rectangle. However when I export to png (or eps) the text ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: xfig renders differently on screen than in png

  1. xfig renders differently on screen than in png

    Hi all.

    I posted this yesterday in comp.windows.x.apps but that newsgroup is a bit
    quiet.

    In xfig, I've got a rectangle with text inside that fits exactly in the
    rectangle. However when I export to png (or eps) the text doesn't fit in
    the rectangle anymore. Is this known behaviour? I do not recall seeing this
    before, but it is also a few years since I have used xfig.

    Here is an example:

    % cat example.fig
    #FIG 3.2
    Landscape
    Center
    Metric
    A4
    100.00
    Single
    -2
    1200 2
    6 900 675 2520 1350
    2 2 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
    *********922*675*2497*675*2497*1350*922*1350*922*6 75
    4 0 0 50 0 0 24 0.0000 4 330 1440 990 1102 Example text\001
    -6
    % cat example.fig | fig2dev example.fig -L png > example.png
    % xv example.png

    Any help would be appreciated.
    Regards, Pepijn Kenter.

  2. Re: xfig renders differently on screen than in png

    in message <2rfdj3F19rtllU1@uni-berlin.de>,
    wrote Pepijn Kenter ...

    > In xfig, I've got a rectangle with text inside that fits exactly
    > in the rectangle.


    In version 3.2.4, I have seen /sometimes/ text to be inside the
    enclosing polygon at one zoom level or point in time; zoom some more
    or redraw, text does not fit. (Obviously, the only solution is to
    enlarge the polygon.)


    > However when I export to png (or eps) the text doesn't fit in the
    > rectangle anymore. Is this known behaviour?

    ....
    > % cat example.fig
    > #FIG 3.2
    > Landscape
    > Center
    > Metric
    > A4
    > 100.00
    > Single
    > -2
    > 1200 2
    > 6 900 675 2520 1350
    > 2 2 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
    > *********922*675*2497*675*2497*1350*922*1350*922*6 75
    > 4 0 0 50 0 0 24 0.0000 4 330 1440 990 1102 Example text\001
    > -6


    Using xfig 3.2.4, i see "Example t" inside the rectangle, "e" on the
    right line and outside the box, rest totally outside the box.


    > % cat example.fig | fig2dev example.fig -L png > example.png

    ^^^^^^^^^^^ ^^^^^^^^^^^
    ^^^^^^^^^^^ ^^^^^^^^^^^
    Why is "example.fig" specified twice?

    That gives me error "No graphics language specified." and empty
    example.png. Following synopsis ...


    fig2dev -L language [ -m mag ] [ -f font ] [ -s fsize ] \
    [ other options ] [ fig-file [ out-file ] ]


    .... in fig2dev(1), C generates,
    besides the empty example.png again, different error ...

    Incomplete line object at line 12.


    - parv

    --
    As nice it is to receive personal mail, too much sweetness causes
    tooth decay. Unless you have burning desire to contact me, do not do
    away w/ WhereElse in the address for private communication.


  3. Re: xfig renders differently on screen than in png

    parv wrote:

    > in message <2rfdj3F19rtllU1@uni-berlin.de>,
    > wrote Pepijn Kenter ...
    >
    >> In xfig, I've got a rectangle with text inside that fits exactly
    >> in the rectangle.

    >
    > In version 3.2.4, I have seen /sometimes/ text to be inside the
    > enclosing polygon at one zoom level or point in time; zoom some more
    > or redraw, text does not fit. (Obviously, the only solution is to
    > enlarge the polygon.)
    >


    I see that too, and of course when text is rendered only a few pixels large
    some inaccuracy is to be expected. But when I export to eps/png the
    differences are considerably larger. This makes it difficult for me to
    asses how large my polygons should be. :-(

    [snip]

    >
    > Using xfig 3.2.4, i see "Example t" inside the rectangle, "e" on the
    > right line and outside the box, rest totally outside the box.
    >


    That is what I see after I have exported it to png, in xfig itself the text
    fits in the bounding box. I'm using xfig 3.2 pathlevel 3d, maybe thats the
    problem.

    >
    >> % cat example.fig | fig2dev example.fig -L png > example.png

    > ^^^^^^^^^^^ ^^^^^^^^^^^
    > ^^^^^^^^^^^ ^^^^^^^^^^^
    > Why is "example.fig" specified twice?


    By accident. My system doesn't give an error so I didn't notice it.

    >
    > That gives me error "No graphics language specified." and empty
    > example.png. Following synopsis ...
    >
    >
    > fig2dev -L language [ -m mag ] [ -f font ] [ -s fsize ] \
    > [ other options ] [ fig-file [ out-file ] ]
    >
    >
    > ... in fig2dev(1), C generates,
    > besides the empty example.png again, different error ...
    >
    > Incomplete line object at line 12.
    >


    The newsreader modifies the text. I see no work arround for that.

    Thanks for the help,
    Pepijn.

  4. Re: xfig renders differently on screen than in png

    in message <2ri5p4F1a48tdU1@uni-berlin.de>,
    wrote Pepijn Kenter ...

    > parv wrote:
    >>
    >> In version 3.2.4, I have seen /sometimes/ text to be inside the
    >> enclosing polygon at one zoom level or point in time; zoom some
    >> more or redraw, text does not fit. (Obviously, the only solution
    >> is to enlarge the polygon.)

    >
    > I see that too, and of course when text is rendered only a few
    > pixels large some inaccuracy is to be expected. But when I export
    > to eps/png the differences are considerably larger.


    I personally did not see the "considerably" factor, only minor.


    > This makes it difficult for me to asses how large my polygons
    > should be. :-(


    So far it has been "second time is the charm" w/ polygons scaled just
    a bit in 100% zoom. If the text fits in xfig, it does fit in EPS,
    PNG, and PDF.

    I never thought that i would actually get to use it in my lifetime but
    .... YMMV.


    - parv

    --
    As nice it is to receive personal mail, too much sweetness causes
    tooth decay. Unless you have burning desire to contact me, do not do
    away w/ WhereElse in the address for private communication.


+ Reply to Thread