[Top][All Lists]

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

[W3-dev] Suggest change to css-expand-length

From: Colin Williams
Subject: [W3-dev] Suggest change to css-expand-length
Date: Mon, 20 Jul 2009 22:05:46 -0400

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.


reply via email to

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