groff
[Top][All Lists]
Advanced

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

Re: [Groff] HTML fonts


From: Gaius Mulley
Subject: Re: [Groff] HTML fonts
Date: Sun, 23 Jan 2000 17:03:36 +0000 (GMT)

Hi Werner,

many thanks for some thought provoking points. They
are very welcome.

Werner writes:

> What is the `font face html operator'?  Please explain. 

I confess I'm not sure how standard this is but in a rather
dubious html book here it says: <font face="arial"> etc etc </font>
But the book does say that these fonts may not be supported by
different browsers. I find no mention of this in the html 4.0
www pages though.

> I think it is best if you restrict grohtml to <b>, <it>, <em>, and
> <tt> (have I missed a font switch?) -- if the user really wants to
> specify a font face, overriding the settings in the user's browser, he
> should use HTML code (via yet-to-be-defined macros in tmac.arkup).

after some thought I think this solution is much cleaner.
Well done.

> After reading design.ms (again), I think that (iii) in the html.cc
> overview section is not ideal.

> IMHO, HTML shouldn't use fonts at all.  It should use entities only,
> interspersed with markups.  All glyphs available in `S' should *only*
> be accessed via groff names and not directly with the char code --
> otherwise it would fail on other output devices anyway.

hopefully this is what is happening when eqn is run ie:

.LP
.EQ
sqrt { a sup 2 over b sub 2 }
.EN

eqn -Thtml eqn2.n | troff -Thtml -ms

generates:

x T html
x res 100 1 1
x init
p1
V115
H100
x X graphic-start
x X graphic-end
n15 0
V155
H382
x X graphic-start
x font 10 S
f10
s24
v7
Csr
Cradicalex

^^^^^^^^^^

> As a
> consequence, `fonts' in devhtml should look similar to the font
> descriptions in devutf8, i.e., all available entities should be
> collected in a single R.proto file.

I think this is very elegant. Will it still cope with equations
and the special character set?

> It makes no sense to mimic PS behavior for HTML output, I believe.

I like the sound of this - but I'm slightly apprehensive about what
will happen to png images.

Gaius writes:

> > I'm not sure whether we could get rid of the other font files since
> > if these fonts were used in a picture/tbl then the positioning
> > would be incorrect.
> ???  Please explain.

maybe I'm confused :-) but what happens about the different
width of courier/roman characters in when we are building
table/pics etc? Currently when a pic is encountered grohtml
sees a:

x X html:graphic-start
some picture
x X html:graphic-end

to generate the picture it generates a troff output file which
is given to grops. It does this by scaling the html glyph
positions up by the postscript resolution/html resolution
and faking a troff -Tps generated equation. I hear people
stomachs turning as I write this :-). If roman chars/courier
chars are given the same width there might be a mess :-)

It could be I'm missing something here and you've got hold
of a elegant solution which means we can delete lines of
code and remove duplicated dev files. I like removing code..
especially if the solution is better..

> A minor thing:  It is `hyphenation', not `hyphernation' :-)

woops sorry and also I've also noticed that I misspelled glyph :-(
I'll try and remember to use 'ispell' in future..

> Yes, please post, or maybe it's better to update design.ms, filling up
> the TODO list?

ok I'll incorporate these two and post tonight.

> Have you ever tried the program `unroff'?  It does a quite nice
> job in translating troff->html.

I'll take a look at the output.

cheers Gaius


reply via email to

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