Re: RTF in the canvas?
- From: Vlad Harchev <hvv hippo ru>
- To: Havoc Pennington <hp redhat com>
- Cc: Miguel de Icaza <miguel ximian com>, Owen Taylor <otaylor redhat com>, gnome-hackers gnome org
- Subject: Re: RTF in the canvas?
- Date: Thu, 10 May 2001 13:47:20 +0500 (SAMST)
On Thu, 10 May 2001, Vlad Harchev wrote:
> On 9 May 2001, Havoc Pennington wrote:
>
> Hi,
>
> If all complex features like tables and probably nested lists and even pics
> are needed, I would suggest to use html as layout description language - it's
> almost as rich as RTF, but humanly readable and may be already
> partially supported by existing components like gtkhtml or gecko.
Just to add - RTF is evil for generation of content at runtime. It has
strange quoting rules and it supports only one encoding for a given "human
language". So, valid russian in RTF will look like
\'a1\'f3\'b0
where \'NN are hexadecimial of characters to write *in cp1251* encoding! So,
in order to generate valid rtf under russian locale with different encoding
(encodings different from cp1251 are widely spread in unixes for russian) one
will have to convert the text they want to generate to cp1251 and then encode
it in the form like \'NN.
So, please don't (ab)use RTF for canvas - it will be nightmare for
programmers and translators.
Advantages of html is that it can be made valid xml, so any xml tools could
be used for manipulation of data. Directly hardcoding font sizes is very bad
idea from accessibility POV - but if you stick to html for markup, decent html
widget will allow you to use CSS for precise layout control. Or at least it
will be easy to invent new attribute that will allow to specify font and size
directly.
> >
> > Miguel de Icaza <miguel ximian com> writes:
> > > You are right.
> > >
> > > It is similar in spirit to what is in there. Can Pango XML markup
> > > allow me to specify any kind of fonts?
> > >
> >
> > Sure, it supports a thing like <span font_desc="Helvetica 12">foo</span>
> > where "Helvetica 12" is a Pango font spec which can include all the
> > font attributes Pango understands.
> >
> > It could be extended further to support more kinds of stuff, it's just
> > a matter of what people find out that they need.
> >
> > (Hey, it occurs to me it even has docs:
> > http://developer.gnome.org/doc/API/2.0/pango/pangomarkupformat.html)
> >
> > Havoc
>
> Best regards,
> -Vlad
>
Best regards,
-Vlad
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]