News for hackers. Stuff that matters.
Re:When monospace fonts aren't: The Unicode character width ... by thaumasiotes on Sunday September 13, 2015 @03:19AM (#10210614)

    int v =
      ((r << 24) & 0xff000000) |
      ((g << 16) &   0xff0000) |
      ((b <<  8) &     0xff00) |
      ( a        &       0xff) ;
Is there a reason you're doing the shift before the mask? I find this much less intuitive than the equivalent

    int v =
      ((r & 0xff) << 24) |
      ((g & 0xff) << 16) |
      ((b & 0xff) <<  8) |
      ( a & 0xff) ;
Re:When monospace fonts aren't: The Unicode character width ... by mzs on Sunday September 13, 2015 @11:47PM (#10213566)
Cause I was trying to exaggerate the effect of space to within reason somewhat?

Cause it was like 1AM here when I wrote it?

Take your pick ;)

Yeah I'd totally write the bottom way I think, or I hope, cheers.