On Tue, Apr 30, 2002 at 09:11:34AM -0600, Jamis Buck wrote: > On Mon, 2002-04-29 at 15:52, Adam McDaniel wrote: > > Set a threshold. If 25% (or so) turns to spacing, then hyphenate > > conservativly so everything looks reasonable. > > I like that idea, but I think it might add unnecessary complexity to the > viewer if you try to do it "on the fly". Especially since it would be > tricky at best to determine the "correct" place to put a hyphen.
Not really. It may be a little extra math to figure out where to put what, but, considering this won't apply to ALL text (only justified alignment), and if my text cacher idea works.. it shouldn't cause much of an overhead at all. > What if that functionality were added to the parser instead of the > viewer? When the parser reads an HTML file and an "auto-hyphenate" > option is set, the parser will insert a "soft" hyphen (­) > everywhere any word might legally be hyphenated. Then, the viewer might > be modified so that when it encounters a soft hyphen, it will only > display it if the word is actually broken at that position. Ugh.. I would strongly recommend against that idea simply becuase there are too many variables to make it viable. The parser's job is to format the text in a way so that the viewer doesn't have to worry about figuring out raw html. The parser has no idea what type of display or font size it's formatting things to either. Ie, Narrow to largebold, or resolution, 160x160, 240x320, 320x320, etc. It would have to be up to the viewer to figure that out on the device it's running on. > The immediately visible drawback to this is: increased file-size. It > may increase the file by as much as 20 to 40 percent, depending on how > many words get hyphenated. Still, it would be much more accurate (since > the parser could rely on word lists to direct the hyphenation, and even > have separate lists for different languages, like the "fop" processor > does). Sorry to shoot the idea down, but its alot like bringing moving the gas station to your car for a fillup. Ok, maybe that analogy doesn't quite work, but you get the idea :) -- Adam McDaniel Array Networks Calgary, AB, Canada
