Forum Feature requests

tabular numbers

hi mike et al,

we've got users with tables.

getting tabular numbers (using proportional fonts) to line up as expected (ie line up on the decimal) seems pretty difficult. I just implemented a horrendous CSS hack to get decimals to line up in a table:
td.skinny {
  padding-right: 12px;

td.extra-skyinny {
  padding-right: 13px;

td.fat {
  padding-right: 9px;

Which is ... a terrible way to solve this problem.

W3C's Feb 2013 working draft for font-variants, suggests:
{font-variant-numeric: tabular-nums;}

Which (should) render something like this (tabular decimals/separators lining up):


This does not seem to be working in Prince 9.

At @dauwhe's suggestion, I also tried:

{font-variant: prince-opentype(tnum)}

{font-variant-numeric: prince-opentype(tnum)}

No luck.

Edited by hughmcguire

Does your font contain tabular figures? I'll go see if I have any fonts that include them.
ah, now that's a good question. I doubt it.

note that we are constrained to open source fonts...
so to clarify ...
tnum / tabular-nums
... would only work if the font has a tabular number set ? no "fake" tabular numbers in the way there is "fake" smallcaps?
I believe that's true. Currently searching for Open Source fonts with tabular figures. Looks like Google's Open Sans has them.
looking for serif :/
hey @MikeDay , I tried to set this today and it's not implemented

which is a bummer because for literally the only time in human history, i'm using a font that actually has tabular number support

is this a thing?

John Haugeland is

Did you try "font-variant: prince-opentype(tnum)"?
i did not :D i was unaware of it

as a special feature, i would like to request that the error message "unknown feature" for the standard feature be augmented to mention the platform specific feature

if nothing else it'll save you more of my lame jokes

this works well enough to help me realize that the font i looked up for tabular numbers doesn't actually have them in the first place

now i have to go find something that does which fits it :/

John Haugeland is

thank you :)

John Haugeland is