Cache::cache_queued
now returns CachedBy
for successes which can allow callers to tell that the texture cache has been re-ordered.PositionedGlyph::set_position
0.7
, use Injector
for minor rasterization performance boost.0.6
1
PositionedGlyph::pixel_bounding_box()
size inconsistencies at different positions with identical sub-pixel positions.CacheBuilder
to use methods to allow non-breaking additions in future. New style is Cache::builder().dimensions(512, 512).build()
.Cache::builder().multithread(false)
.Debug
implementations for Font
, Glyph
, ScaledGlyph
& PositionedGlyph
0.7
non-breaking main API, while keeping the current version of the gpu_cache module.CacheBuilder::rebuild
& Cache::to_builder
methods.From<&AsRef<[u8]>> for SharedBytes
.gpu_cache
hashing to improve benchmark performance by ~30%.gpu_cache::Cache::new
in favour of gpu_cache::CacheBuilder
.gpu_cache::Cache::set_scale_tolerance
& gpu_cache::Cache::set_position_tolerance
. These are now equivalent to recreating the cache as they invalidate the cache keys.scale_tolerance
& position_tolerance
now have subtly different meanings but guarantee their error in all cases, where previously the worst case was double the set tolerance.CacheBuilder
to construct a Cache
that makes use of padding.Font::glyph
and Font::pair_kerning
work with both characters and glyph ids by having them accept any type that implements the new IntoGlyphId
trait. This replaces the CodepointOrGlyph
enum, which didn't seem widely used.Font::glyph
always return a Glyph
, not Option<Glyph>
. Passing a char
the font doesn't cover returns a .notdef
glyph (id 0), as it did before. Passing an invalid glyph id now panics, like a bad array index: glyph ids should only be used to index the font they were looked up for.rusttype::Error
, which implements std::error::Error
, Debug
and Display
, and can be converted to std::io::Error
.Result<_, rusttype::Error>
to report failures in FontCollection, Font and associated iterators.Font::from_bytes
method similar to FontCollection::from_bytes
for 1 font collections.Font
. (#86)Fixed issue #8
Fixed issue #7
Initial release