Suggest change to css-expand-length

Colin Williams <[email protected]> Mon, 20 Jul 2009 22:05:46 -0400
Newsgroups gmane.emacs.w3.devel
Message-ID <[email protected]>
--===============1747903467==
Content-Type: multipart/alternative; boundary=001485f6293e5aa4e1046f2db1f8

--001485f6293e5aa4e1046f2db1f8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I don't think this is exactly correct, but I think it will work better than
what's there.

((string-match "\\([+-]?\\([0-9]+\\|[0-9]*\\.[0-9]+\\)\\)e[mx]" spec)
    ;; Character based
    ;; XXX: should be relative to font size of enclosing element
    (string-to-number (match-string 1 spec)))

Basically, each "em" unit should be the size of two spaces (or lines).
Currently the function uses font-spatial-to-canonical, which returns the
number of points for the number of pixels.  Somehow, this number of points
gets turned into the number of spaces, which is definitely wrong.

If you can think of a better way to address the issue, this was just an
idea.  It was pretty much just a hack to make a page not look totally
ridiculous, just thought it would help the project.

Colin

--001485f6293e5aa4e1046f2db1f8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I don&#39;t think this is exactly correct, but I think it will work better =
than what&#39;s there.<br><br>((string-match &quot;\\([+-]?\\([0-9]+\\|[0-9=
]*\\.[0-9]+\\)\\)e[mx]&quot; spec)<br>=C2=A0=C2=A0=C2=A0 ;; Character based=
<br>=C2=A0=C2=A0=C2=A0 ;; XXX: should be relative to font size of enclosing=
 element<br>
=C2=A0=C2=A0=C2=A0 (string-to-number (match-string 1 spec)))<br><br>Basical=
ly, each &quot;em&quot; unit should be the size of two spaces (or lines).=
=C2=A0 Currently the function uses font-spatial-to-canonical, which returns=
 the number of points for the number of pixels.=C2=A0 Somehow, this number =
of points gets turned into the number of spaces, which is definitely wrong.=
<br>
<br>If you can think of a better way to address the issue, this was just an=
 idea.=C2=A0 It was pretty much just a hack to make a page not look totally=
 ridiculous, just thought it would help the project.<br><br>Colin<br>

--001485f6293e5aa4e1046f2db1f8--



--===============1747903467==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
W3-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/w3-dev

--===============1747903467==--