1. 25 8月, 2015 1 次提交
    • N
      Quantize sub-pixel glyph rendering. · 62e59645
      Nigel Tao 提交于
      This is in anticipation of caching glyph images. Quantization means that cache
      hits are more likely.
      
      Also make NewFace take an *Options instead of an Options.
      62e59645
  2. 24 8月, 2015 3 次提交
  3. 23 8月, 2015 1 次提交
    • N
      Make face.Glyph not allocate a new mask each time. · 9c46b875
      Nigel Tao 提交于
      benchmark                 old ns/op     new ns/op     delta
      BenchmarkDrawString-4     96914389      88683659      -8.49%
      
      benchmark                 old allocs     new allocs     delta
      BenchmarkDrawString-4     32287          0              -100.00%
      
      benchmark                 old bytes     new bytes     delta
      BenchmarkDrawString-4     1929619       156           -99.99%
      9c46b875
  4. 22 8月, 2015 1 次提交
    • N
      Add a truetype.Face type. · 6deea241
      Nigel Tao 提交于
      Its implementation is mostly a copy/paste of the freetype.Context type.
      Follow-up commits will make it more efficient.
      
      Also add an example that uses a truetype.Face and the
      golang.org/x/exp/shiny/font package to draw text.
      6deea241