[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 01224] Re: Rendering bugs in 1.10a



On Thu, Jun 26, 2003 at 11:15:25PM -0700, Yoshifumi Nishida wrote:
> From: Tim Maher <tim@consultix-inc.com>
> Subject: [mgp-users 01221] Rendering bugs in 1.10a
> Date: Thu, 26 Jun 2003 10:35:32 -0700
> Message-ID: <>
> 
>  > I've created three side-by-side images to illustrate the
>  > problems, showing in each case the 1.09a versions on the
>  > left-hand side, and the (different, and IMHO incorrect) 1.10a
>  > versions on the right.
> 
> I believe it's not a bug.
> I guess you're using %default for line 4 or line 5 and that makes the
> difference.
> In 1.09a, %tab is evaluated after %default, while it's evaluated 
> before %default in 1.10a. Thus, in 1.09a, the %default for line 4 or line5
> is overwritten by %tab. 
>
> Yoshifumi Nishida
> nishida@csl.sony.co.jp

The "Tabs vs Line defaults" Battle
-----------------------------------
You're right, that seems to be the explanation for *one* of the
differences I observed in comparing 1.09 and 1.10, but now I'm
wondering why I didn't see that discrepancy in hundreds of slides
instead of just a few. I think there must be something else going
on here, which I'll work on identifying.

In the meantime, I'd have to say that I think it's undesirable
and very confusing to have *both* %tab and %default processing
applied to the *same line* of text, which is what I see
happening in 1.10a.

This leads to mixed results, such as a line that's rendered in
the font, size, and vgap dictated by "%default 5", but with text
colored according to "%tab 1", along with a bullet symbol! (Which
is the effect shown on the right side of
http://teachmeperl.com/advice.jpg.)

I don't think this behavior is desirable, especially because it's
different from 1.09, and as far as I can tell it's not documented
that some presentations composed for earlier versions will need
to be reworked to display the same way in 1.10a.

The "Bullet-Item %vgap" Problem
-----------------------------------

I'm glad to report that I've figured out the problem related to
%vgap spacing of bullet items.

In 1.09a my practice of starting every page with a standard %vgap
setting doesn't affect bullet items, but in 1.10a, that %vgap
setting is *used* for the next bullet item, and non-bullet text
leading up to the following one, which creates the discrepancy
shown in http://teachmeperl.com/spugstats.jpg.

Personally, I like having some control over the intra-line
spacing for wrapped-around bullet items, which this behavior in
1.10a permits, but at the expense of losing the much desired vgap
after the bullet item, which is unfortunate.

For example, here are the two formats for bullet items we've
currently got, and a third I think we should have as an option,
implemented using half the bullet-item's vgap setting for
intra-line spacing.

Form 1 (as in 1.09a)
------------------------------------------
* line one of 1st bullet item

  now wrapped around to next physical line

* line one of 2nd bullet item

  now wrapped around to next physical line

------------------------------------------

Form 2 (1.10a, using manual %vgap before *each*)
------------------------------------------
* line one of 1st bullet item now wrapped around to next
  physical line
* line one of 2nd bullet item now wrapped around to next
  physical line
------------------------------------------

Form 3 (non-existent, but desired; 1.10b maybe?)
------------------------------------------
* line one of 1st bullet item now wrapped around to next
  physical line

* line one of 2nd bullet item now wrapped around to next
  physical line

------------------------------------------

Here's an annotated version of the *.mgp file that illustrates
the behavior of 1.10a with regard to %vgap calls before a bullet
item, along with a simplified *.mgprc file that can be used with
it for testing (apart from non-existent fonts).


vgap_bug.mgp:
%include "test.mgprc"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# To view the different renderings of this file by 1.09a and
# 1.10a viewers, see teachmeperl.com/spugstats.jpg
%page
%center

%fore "white"
(C) 2003, Tim Maher                   0-1                   www.TeachMePerl.com
SPUG Stats
Guru Patronage

%leftfill
# My vgap-setting for "tab 1" is "%vgap 75", but in 1.10 (not 1.09) that
# is being overwritten by an explicit setting on a prior line,
# such as the one below, for the next bullet item only
%vgap 20
	SPUG has been a Guru magnet; past speakers include 
%cont
(by some definitions of "speaker"):
		Damian, Dan, Dominus, Gisle, Larry, Nat, Randal,
#
# In contrast, these next two identical bullets will be rendered as in 1.09a,
# so long as the %vgap remains commented-out
#
# %vgap 20
	SPUG has been a Guru magnet; past speakers include 
%cont
(by some definitions of "speaker"):
		Damian, Dan, Dominus, Gisle, Larry, Nat, Randal,

test.mgprc:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% This default.mgp is "TrueType fonts" oriented.
%% First, you should create "~/.mgprc" whose contents are:
%%	tfdir "/path/to/truetype/fonts"
%%
%% To visualize English, install "standard.ttf", "thick.ttf", and 
%% "typewriter.ttf" into the "tfdir" directory above:
%%	ftp://ftp.mew.org/pub/mgp/ttf-us.tar.gz
%%
%% To visualize Japanese, install "kochi-mincho.ttf" and "goth.ttf"
%% into the "tfdir" directory above:
%%	ftp://ftp.mew.org/pub/mgp/ttf-jp.tar.gz
%%
%deffont "default"   tfont "dixon.ttf"
%deffont "bold"   tfont "dixon1.ttf"
%deffont "italic"   tfont "dixon2.ttf"
%deffont "bolditalic"   tfont "dixon3.ttf"
%deffont "bi"   tfont "dixon3.ttf"
%deffont "italicb"   tfont "dixon3.ttf"
%deffont "ib"   tfont "dixon3.ttf"
%deffont "wide"   tfont "dixon_wd.ttf"
%deffont "wideb"   tfont "dixon_w1.ttf"
%deffont "exp"   tfont "dixon_ex.ttf"
%deffont "expb"   tfont "dixon_e1.ttf"
%deffont "thin"   tfont "dixon_th.ttf"
%deffont "standard"   tfont "standard.ttf"
%deffont "thick"      tfont "thick.ttf"
%deffont "typewriter" tfont "typewriter.ttf"
%deffont "tty" tfont "Wqtm_p_t.ttf"
%deffont "c" tfont "cour.ttf"
%deffont "courier" tfont "cour.ttf"
%deffont "courierb" tfont "courbd.ttf"
%deffont "cb" tfont "courbd.ttf"
%deffont "ci" tfont "couri.ttf"
%deffont "courieri" tfont "couri.ttf"
%deffont "cbi" tfont "courbi.ttf"
%deffont "courierbi" tfont "courbi.ttf"
%deffont "title" tfont "arial.ttf"
%deffont "titleb" tfont "olvr75w.ttf"
%deffont "titleb2" tfont "ariblk.ttf"
%deffont "bull1" tfont "verdanab.ttf"
%deffont "bull2" tfont "verdana.ttf"
%deffont "bull3" tfont "dixon_wd.ttf"
%deffont "bull4" tfont "dixon_wd.ttf"
%deffont "title2" tfont "dixon_wd.ttf"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings per each line numbers.
%%
%default 1 area 90 90, leftfill, size 1, fore "gray", back "black", font "italic"
%default 2 size 4, vgap 0, prefix " ", font "default", vgap 0
%default 3 size 7, vgap 100, bar "gray70", vgap 10, fore "green", font "thick"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Default settings that are applied to TAB-indented lines.
%%
%tab 1 size 5,  fore "white", vgap 75, prefix		"  ", icon arc "yellow" 55, tfont "standard"
%tab 2 fore "pink", size 4.8, vgap 75, prefix		"     ", icon delta3 "green" 50, tfont "thick"

-Tim
*------------------------------------------------------------*
| Tim Maher (206) 781-UNIX  (866) DOC-PERL  (866) DOC-UNIX   |
| CEO, JAWCAR ("Just Another White Camel Award Recipient")   |
| tim(AT)Consultix-Inc.Com  TeachMeUnix.Com  TeachMePerl.Com |
*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
|  Watch for my Book: "Minimal Perl for Shell Programmers"   |
*------------------------------------------------------------*