Options:
- # Session Start: Fri Oct 28 00:00:00 2011
- # Session Ident: #css
- # [00:01] * Quits: TabAtkins_ (tabatkins@72.14.229.17) (Ping timeout)
- # [00:02] * Quits: arno (arno@192.150.10.200) (Quit: Leaving.)
- # [00:04] * Joins: arno (arno@192.150.10.200)
- # [00:05] * Quits: arno (arno@192.150.10.200) (Quit: Leaving.)
- # [00:06] * Joins: arno (arno@192.150.10.200)
- # [00:35] * Quits: arno (arno@192.150.10.200) (Quit: Leaving.)
- # [00:39] * Joins: arno (arno@192.150.10.200)
- # [00:48] * Quits: arno (arno@192.150.10.200) (Quit: Leaving.)
- # [00:49] <fantasai> hyatt: am now
- # [00:50] <fantasai> hyatt: sorry, was making lunch
- # [00:50] <fantasai> hyatt: The thing I haven't figured out wrt line grid is exactly how to determine the snap point
- # [00:50] <fantasai> hyatt: That's what I'm most stuck on right now
- # [00:51] <fantasai> hyatt: If you slide down to the next line on the grid when you're over, then it won't work for straightening the wavering baselines you get with random mixed fonts
- # [00:51] <fantasai> hyatt: you'll randomly jump
- # [00:59] * Joins: ChrisL2 (ChrisL@205.248.100.252)
- # [00:59] * Quits: ChrisL (ChrisL@128.30.52.169) (Quit: Fire on main board error, client combusted)
- # [00:59] * Quits: ChrisL2 (ChrisL@205.248.100.252) (Client exited)
- # [00:59] * Joins: ChrisL (ChrisL@128.30.52.169)
- # [01:00] * Joins: TabAtkins_ (tabatkins@64.236.139.254)
- # [01:01] * Joins: arno (arno@192.150.10.200)
- # [01:11] * Quits: arno (arno@192.150.10.200) (Ping timeout)
- # [01:28] * Joins: myakura (myakura@203.136.164.250)
- # [01:34] * Quits: myakura (myakura@203.136.164.250) (Client exited)
- # [01:44] * Joins: jarek (jarek@79.186.18.228)
- # [01:45] * Joins: dbaron (dbaron@63.245.220.240)
- # [02:31] * Quits: TabAtkins_ (tabatkins@64.236.139.254) (Ping timeout)
- # [03:11] * Quits: dbaron (dbaron@63.245.220.240) (Quit: 8403864 bytes have been tenured, next gc will be global.)
- # [03:16] * Quits: arronei (arronei@131.107.0.113) (Ping timeout)
- # [03:20] * Joins: arronei (arronei@131.107.0.116)
- # [03:21] * Quits: jarek (jarek@79.186.18.228) (Ping timeout)
- # [03:23] * Joins: jarek (jarek@83.27.239.2)
- # [03:40] * Quits: ChrisL (ChrisL@128.30.52.169) (Ping timeout)
- # [03:52] * Joins: dbaron (dbaron@173.228.28.129)
- # [03:53] * Joins: jarek_ (jarek@83.27.235.236)
- # [03:54] * Quits: jarek (jarek@83.27.239.2) (Ping timeout)
- # [04:33] * Joins: jarek (jarek@79.186.18.229)
- # [04:34] * Quits: jarek_ (jarek@83.27.235.236) (Ping timeout)
- # [05:02] * Joins: stearns (anonymous@209.119.68.98)
- # [05:04] * Joins: jarek_ (jarek@83.27.235.244)
- # [05:05] * Quits: jarek (jarek@79.186.18.229) (Ping timeout)
- # [05:29] * Joins: karl (karlcow@128.30.54.58)
- # [05:38] * Quits: jarek_ (jarek@83.27.235.244) (Quit: jarek_)
- # [06:13] * Joins: ChrisL (ChrisL@128.30.52.169)
- # [06:31] * Quits: ChrisL (ChrisL@128.30.52.169) (Quit: Fire on main board error, client combusted)
- # [07:26] * Quits: dbaron (dbaron@173.228.28.129) (Ping timeout)
- # [07:31] * Joins: dbaron (dbaron@173.228.28.129)
- # [07:32] * Quits: dbaron (dbaron@173.228.28.129) (Quit: 8403864 bytes have been tenured, next gc will be global.)
- # [07:46] * Joins: arno (arno@192.150.10.200)
- # [07:46] * Quits: arno (arno@192.150.10.200) (Client exited)
- # [07:54] * Quits: stearns (anonymous@209.119.68.98) (Quit: stearns)
- # [11:10] * Quits: shepazu (shepazu@128.30.52.169) (Quit: shepazu)
- # [11:59] * Joins: myakura (myakura@203.136.164.250)
- # [12:03] * Quits: myakura (myakura@203.136.164.250) (Client exited)
- # [12:57] * Joins: myakura (myakura@203.136.164.250)
- # [15:02] * Joins: miketaylr (miketaylr@206.217.92.186)
- # [16:06] * Quits: myakura (myakura@203.136.164.250) (Client exited)
- # [16:32] * Joins: stearns (anonymous@209.119.68.98)
- # [17:07] * Quits: florianr (florianr@213.236.208.22) (Ping timeout)
- # [17:10] * Joins: florianr (florianr@213.236.208.22)
- # [17:18] * Quits: stearns (anonymous@209.119.68.98) (Quit: stearns)
- # [17:18] * Quits: florianr (florianr@213.236.208.22) (Client exited)
- # [17:53] <hyatt> fantasai: why not just lay out the whole line and then only adjust the baseline of the root line box
- # [17:53] <hyatt> doesn't seem like you have to do per-box adjusting, just a single line adjustment
- # [18:17] * Joins: stearns (anonymous@216.239.45.22)
- # [18:25] <hyatt> fantasai: also, seems like line-box-contain could be used as the property to apply "tolerance" in mixed font scenarios
- # [18:26] <hyatt> heck, line-box-contain by itself practically gives you the grid as long as you don't' use much bigger fonts :)
- # [18:26] <hober> i'd almost want "line-grid:foo" to imply line-box-contain behavior
- # [18:27] <hober> hey, you wanted a grid, so you get a regular grid
- # [18:29] <hyatt> i really like the idea that line-grid just says creates a named grid and line-snap is what causes you to align to it
- # [18:30] <hyatt> i really have no problem with a slightly taller font pushing you to the next line of the grid
- # [18:30] <hyatt> since technically if it doesn't, you're saying you want that font to overlap the previous line
- # [18:30] <hyatt> oh i guess that's not necessarily true because of line-height
- # [18:31] <hyatt> but yeah pretty sure ibooks just defines line-box-contain now
- # [18:31] <hyatt> so basically it has a line-grid and just ignores the other fonts on a line in descendant boxes
- # [18:31] * Joins: jarek (jarek@83.27.233.214)
- # [18:32] <hyatt> although i guess margins etc. would throw off the grid
- # [18:32] <hyatt> but in japanese you wouldn't have the margins
- # [18:32] <hober> right right
- # [18:33] <hyatt> seems like you just want some kind of "tolerance"
- # [18:33] <hyatt> for mixed font scenarios
- # [18:34] <hyatt> where the font may only be e.g., 1px bigger than the grid's font
- # [18:34] <hyatt> you need it to work without line-box-contain so that the case where you use an obviously bigger font doesn't look bad
- # [18:35] <hyatt> in places where you want a grid and do have lots of irregularity in font choices
- # [18:35] <hyatt> that seems tricky
- # [18:36] <hyatt> one idea that might work is being willing to shed the line-height off larger fonts
- # [18:36] <hyatt> the leading
- # [18:36] <hyatt> to stay aligned to the grid
- # [18:36] <hyatt> and only move if all the leading is eaten up and you still don't fit
- # [18:36] * Joins: ChrisL (ChrisL@128.30.52.169)
- # [18:40] <hyatt> hober: guess i'll just implement it with zero tolerance for now
- # [18:44] <fantasai> hyatt: It's not about the font being bigger
- # [18:44] <fantasai> hyatt: It's about the same-size fonts aligning differently once you align their baselines
- # [18:44] <fantasai> hyatt: such that the content box is bigger than 1em
- # [18:44] <fantasai> hyatt: margins don't count in line box calculations anyway
- # [18:44] * Joins: plinss (plinss@216.239.45.23)
- # [18:44] * fantasai waves to plinss
- # [18:45] <fantasai> plinss: join #test
- # [18:45] <hyatt> yeah i know margins aren't relevant
- # [18:45] * plinss waves back
- # [18:45] <hyatt> what alignment algorithm are you envisioning? I had assumed you'd just snap the root baseline, i.e., move the entire line
- # [18:45] <hyatt> rather than looking at any specific line boxes on the line
- # [18:45] <hyatt> so any delta between boxes on the same line would be preserved and unaffected by the snapping
- # [18:46] <fantasai> right
- # [18:47] <fantasai> but you only want to do that if the line box is going to fit between them
- # [18:47] <hyatt> fit between what?
- # [18:47] <fantasai> if you have a line that is line-height: 2; and the line grid is line-height: 1; then you want to snap every other line
- # [18:47] <fantasai> right?
- # [18:47] <fantasai> and if you have line-height: 1.5, then you'll also wind up snapping every other line
- # [18:47] <hyatt> yup
- # [18:48] <hyatt> isn't that what would happen?
- # [18:48] <fantasai> yes
- # [18:48] <fantasai> Now
- # [18:48] <fantasai> if you have line-height: 1, you want to snap to every line
- # [18:48] <fantasai> right?
- # [18:49] <hyatt> would like to, but maybe my font is way bigger
- # [18:49] <hyatt> i mean, i was assuming you do this
- # [18:49] <hyatt> assume the previous line has been snapped
- # [18:49] <fantasai> assume the same font size throughout
- # [18:49] <hyatt> and is placed properly
- # [18:49] <fantasai> yes
- # [18:49] <fantasai> now
- # [18:49] <hyatt> then the next line i would compute a hypothetical placement
- # [18:49] <hyatt> below the previous snapped line
- # [18:49] <fantasai> even though we have line-height: 1; and the font size has not changed
- # [18:49] <hyatt> without doing any snapping
- # [18:49] <hyatt> and then just move down to the next baseline once the whole line has been laid out
- # [18:49] <fantasai> if we have mixed fonts, it's possible for the distance between two baselines to be more than 1em.
- # [18:50] <fantasai> but in that case you still want to snap to every line
- # [18:50] <fantasai> not randomly jump whenever there's font fallback on the line
- # [18:50] <hyatt> yeah we're talking about the same situation
- # [18:50] <hyatt> we'rej ust phrasing it differently
- # [18:50] <fantasai> k :)
- # [18:51] <hyatt> line-box-contain is already turned on for all of ibooks heh
- # [18:51] <hyatt> so fallback fonts never even get looked at
- # [18:51] <fantasai> So we need to have a tolerance definition that works around that particular issue
- # [18:51] <hyatt> well, their glyphs do, but nothing else heh
- # [18:51] <hyatt> fantasai: i suggested an idea of being willing to consume leading
- # [18:51] <fantasai> right, but how much? and what if there isn't any?
- # [18:51] <hyatt> to eat into the fallback font's leading
- # [18:51] <hyatt> yeah
- # [18:52] <fantasai> anyway, I was thinking about this on the train today
- # [18:52] <hyatt> if there isn't any leading, though, you are asking for the glyphs of the font to potentially overlap
- # [18:52] <hyatt> which seems wrong to me
- # [18:52] <fantasai> I think we could define that tolerance
- # [18:52] <fantasai> as the distance between embox top of the highest-aligned font and the embox bottom of the lowest-aligned font
- # [18:52] <fantasai> er
- # [18:52] <fantasai> s/bottom/top/
- # [18:52] <fantasai> so basically the variance
- # [18:53] <hyatt> so you'd just look at all the used fonts on the line?
- # [18:53] <fantasai> (or range, I guess woudl be the statistical term)
- # [18:53] <fantasai> yes
- # [18:53] <fantasai> align them all against your baseline
- # [18:53] <hyatt> ah and look at unscaled embox
- # [18:53] <hyatt> or scaled to the font size of the grid or the font size of the root box
- # [18:53] <fantasai> and take the difference between the highest and the lowest as your slack
- # [18:53] <hyatt> one of those i guess
- # [18:54] * Joins: TabAtkins_ (tabatkins@216.239.45.4)
- # [18:54] <fantasai> well, I'd include anything on the line, like we do today
- # [18:54] <hyatt> right but an actual 2x size font should cause you to push etc
- # [18:54] <fantasai> if the author wants larger font sizes to leak, then they should specify line-height: 1em; instead of line-height: 1
- # [18:54] <hyatt> you're mostly concerned with a tolerance based deltas between fonts of the same size
- # [18:54] <fantasai> yeah
- # [18:55] <fantasai> that's the one that nobody'll understand or be able to fix
- # [18:55] <hyatt> so the slack should probably be computed s though all the used fonts have the same font size
- # [18:55] <hyatt> that way you don't do the wrong thing if the font really is much bigger
- # [18:56] <hyatt> but yeah it's that "oh this font had a 1px baseline shift relative to the root because it's fallback and now the entire line snapped to the next grid position instead"
- # [18:56] <fantasai> if it's bigger, then the line box will grow as necessary..
- # [18:56] <hyatt> that's the case to fix
- # [18:56] <fantasai> right
- # [18:56] <fantasai> in mixed-script books, you'll get a lot of that :)
- # [18:56] <hyatt> yeah
- # [18:56] <fantasai> also when you're mixing fonts intentionally, e.g. using monospace for code snippets
- # [18:56] <hyatt> as i sad though we set line-box-contain
- # [18:56] <hyatt> said
- # [18:56] <hyatt> so it's less of an issue for us
- # [18:56] * Joins: dbaron (dbaron@206.15.76.122)
- # [18:57] <hyatt> ibooks has line-box-contain set to "block glyphs replaced" for all books
- # [18:57] <hyatt> so it won't run into these issues really
- # [18:57] <hyatt> even if i defined a grid with zero tolerance
- # [18:57] * fantasai hasn't looked at line-box-contain enough to remember what all that means :)
- # [18:58] <hyatt> basically it means that fallback fonts or different fonts in inline descendants only use their glyph bounds as far as affecting the line
- # [18:59] <hyatt> so they are extremely unlikely to push the line down
- # [18:59] <hyatt> ever
- # [18:59] <fantasai> ...
- # [18:59] <fantasai> depends on the font there :)
- # [18:59] <hyatt> yeah can still happen
- # [18:59] <hyatt> just very very unlikely
- # [19:00] <hyatt> since the glyph will typically fit in the leading of the other font even if there's a 1-2px difference
- # [19:00] <fantasai> fair
- # [19:00] <fantasai> especially for books that would work better
- # [19:00] <fantasai> since they tend not to use flourishy fonts :)
- # [19:00] <hyatt> yeah this was the fix we made for the problem of larger fonts commonly being used on first lines of chapters
- # [19:00] <hyatt> causing the first line of a chapter to suddenly have a huge descent
- # [19:00] <fantasai> ouch
- # [19:00] <fantasai> yeah
- # [19:01] <hyatt> ok lunchtime
- # [19:01] <hyatt> bbl
- # [19:01] <fantasai> laters~
- # [19:32] * Quits: karl (karlcow@128.30.54.58) (Quit: Freedom - to walk free and own no superior.)
- # [19:42] * Quits: jarek (jarek@83.27.233.214) (Ping timeout)
- # [19:44] * Joins: jarek (jarek@79.186.16.175)
- # [20:33] * Quits: jarek (jarek@79.186.16.175) (Ping timeout)
- # [20:33] * Joins: jarek (jarek@79.186.16.139)
- # [20:33] * Quits: jarek (jarek@79.186.16.139) (Quit: jarek)
- # [20:37] * Quits: stearns (anonymous@216.239.45.22) (Quit: stearns)
- # [20:38] * Quits: plinss (plinss@216.239.45.23) (Quit: plinss)
- # [20:41] * Quits: TabAtkins_ (tabatkins@216.239.45.4) (Ping timeout)
- # [20:51] * Joins: bluebearing (4428bc9a@64.62.228.82)
- # [21:02] * Parts: bluebearing (4428bc9a@64.62.228.82)
- # [21:03] * Quits: anne (annevk@83.85.115.123) (Ping timeout)
- # [21:31] * Joins: shepazu (shepazu@128.30.52.169)
- # [21:41] * Joins: stearns (anonymous@216.239.45.18)
- # [21:43] * Joins: plinss (plinss@216.239.45.19)
- # [21:58] * Joins: TabAtkins_ (tabatkins@216.239.45.4)
- # [23:10] * Quits: miketaylr (miketaylr@206.217.92.186) (Quit: miketaylr)
- # [23:28] * Quits: TabAtkins_ (tabatkins@216.239.45.4) (Ping timeout)
- # [23:33] * Quits: plinss (plinss@216.239.45.19) (Quit: plinss)
- # [23:36] * Joins: plinss (plinss@216.239.45.19)
- # [23:42] * Joins: TabAtkins_ (tabatkins@216.239.45.4)
- # [23:50] * Joins: jarek (jarek@79.186.11.153)
- # Session Close: Sat Oct 29 00:00:01 2011
The end :)