lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev hyphenation


From: Vlad Harchev
Subject: Re: lynx-dev hyphenation
Date: Sun, 1 Aug 1999 16:18:43 +0500 (SAMST)

On Sat, 31 Jul 1999, Klaus Weide wrote:

>[...] 
> >   It seemed to me that entire next word is accumulated..   I'll try to do 
> > this
> > first (ie to wait until entire word arrives - until next space or cr or lf) 
> > -
> 
> Or the line is full (MAX_LINE), or the candidate word is longer than the
> longest you can handle (longest word in dictionary?).
 
 Of course (and TeX rules are not based on dictionaries, they are based on
patters). There is a description of algorithm used in libhnj.
 
> > seems only HText_appendCharacter should be tweaked and checked for side
> > effects.
> 
> It seems every use of HText_TrueLineSize and of HText_LastLineSize also
> has to be checked.

 Ok.

> [...]
> >  Seems one of the solutions will be to rely on me->sp->style (I believe lynx
> > maintains me->sp->style->align according to the ALIGN attribute - at least 
> > HT_RIGHT and HT_LEFT are differenciated and reflected) - so (3) and (3a) can
> > be achieved by initializing all stylesheet values to either HT_LEFT (first 
> > case) or HT_JUSTIFY before entering mainloop().
> 
> Maybe only those styles in DefaultStyle.c for which (a) justification
> actually makes sense (I thing this should exclude for example Hn) and
> the code can deal with it, and (b) which don't already have variants
> for specific alignments {HT_LEFT,HT_RIGHT,HT_CENTER} - DivLeft,DivRight,
> DivCenter.  And add some new ones e.g. (or only?) DivJustify.  

 Of course for those styles for which justification makes sense.

> In various places HTML.c (also to check: LYCharUtils.c) changes the
> alignment of various HTStyles temporarily and later tries to reset
> them to default values.  E.g. the alignment of DivCenter can become
> HT_LEFT and so on.  (And the re-setting doesn't always seem to work
> right, in more complicated cases of nested blocks with different
> alignments).  It's all a mess that has to be checked...  But it seems
> still better to me to plug the new kind of alignment into the existing
> mechanism rather than having (only) a completely orthogonal mechanism.

 This what I was afraid of - style->align changes scattered around the 
many files - that's why I delay writing extended logic.
 
> >  Klaus, have you seen justification in work? (IMO anybody won't allow page
> > author to inhibbit justification of the paragraph that can be nicely 
> > justified
> > only because the author decided to do it so due to some unknown reason - or
> > may be left-aligned texts looks not worth than justified in graphical mode).
> 
> I haven't seen it in Lynx.  I can see man pages.  I don't feel it is
> something I am missing much in Lynx so far.  I got the impression that
> others feel the same way.
> 
> If anything, I would think justified text is *more* likely to look good
> in graphical browser than in text mode.

 Of course.

> Not all authors are clueless.  Give them at least a chance to get the
> alignment they can expect from a browser that implements "justify"
> according to the HTML spec, instead of thinking you always know better
> where ALIGN="justify" is 'reasonable' (if turned on at all).
> 
> You experience and opinion may also depend on the kinds of pages you
> visit.  Pages with lots of short paragraphs (say 2 or 3 lines) likely
> won't look good with justification.

 Seems any pages with any types of paragraphs look better - the right boundary 
 is perfectly visible. Best effects are seen on pages with plain text (no
URLs) and long paragraphs.

 As for supporting align= attribute:

 IMO html can be seen as pair (info about structure,decorative-only markup).

 It should be rendered. When rendering, we can ignore parts of
"decorative-only markup" - e.g. align=LEFT attribute, 
or not showing images for IMG element - it's not a crime (IMO at least). Even
in IE and NS user can override document fonts, background, colors... What you
suggest is to  add mode when 'decorative-only markup' is honored as much as
possible.
 
> >  Anyway, I don't guarantee that I will do this ASAP.
> > 
> >  Seems we can ask anybody that tried justification in lynx whether s/he 
> > would
> > like to honor correct ALIGN= value of the html elements or s/he would like
> > to see justified everything reasonable.
> > 
> >  I should inform that I'll have free time to work on hyphenation in the 2nd
> > half of August. And I hardly can force myself to complete logic that 
> > controls
> > justification before writing support for hyphenation. Sorry.
> 
> I think you said yourself that 99% of "justify" was already done...
> (or was it 98%?)

 Yes, I said this.
 I don't have time (or don't what to think about several things in parallel).
 May be somebody else than me will implement that 1%?

 Let's wait another opinions from lynx-dev readers on how do they like
 justification. 

>    Klaus
> 

 Best regards,
  -Vlad


reply via email to

[Prev in Thread] Current Thread [Next in Thread]