Releases: alexheretic/glyph-brush
Releases · alexheretic/glyph-brush
glyph-brush-draw-cache-0.1.2
- Optimise empty cache
cache_queued
calls by bundling texture data into a single upload.
glyph-brush-draw-cache-0.1.1
- Require ab_glyph 0.2.2.
glyph-brush-layout-0.2
- Rework crate switching from rusttype to ab_glyph.
- Layout returns
SectionGlyph
s which containsection_index
& stringbyte_index
. - Drop support for
Color
which didn't affect layout & can now be associated to sections without built-in support. - Glyph bounding boxes are no longer used at all during layout. This means invisible glyphs, like
' '
, are now generally included.
- Layout returns
glyph-brush-draw-cache-0.1
- Port rusttype gpu cache to ab_glyph.
- Use exact texture rect position, adjusted for different sub-pixel matches.
- Use rayon for concurrent outline calculation & rasterization.
- Use crossbeam-channel for channelling.
- Implement local batch work stealing for rasterization tasks improving population performance by 1.1x.
glyph-brush-0.7
- OpenType (.otf) fonts are now supported in addition to .ttf fonts. They're just as fast as .ttf fonts too.
- Rework crate switching from rusttype to ab_glyph. ab_glyph is re-exported to
glyph_brush::ab_glyph
,
rusttype types are gone, e.g. all usage ofrusttype::Scale
is replaced withab_glyph::PxScale
. - New
Section
struct redesign replacesVariedSection
& the oldSection
supporting generic extra data & builder syntax.// 0.7: Optional builder style, one API for simple & varied sections Section::default().add_text(Text::new("Hello").with_scale(25.0))
// 0.6 Section { text: "Hello", scale: Scale::uniform(25.0), ..<_>::default() }
- Section
color
&z
are now part of anExtra
struct which is the defaultextra
type. This allows previous usage to continue but also downstream users to use differentExtra
data.
This data is provided to the vertex generator function. - To aid with refactoring from the previous version some equivalent versions of legacy structs are available
legacy::{VariedSection, Section, SectionText}
. So in some cases you can just slaplegacy::
in front of the old
code and fix somePxScale
usages and away you go. I'll deprecate and eventually remove this module.// 0.7 legacy::Section { text: "Hello", scale: PxScale::from(25.0), ..<_>::default() }
pixel_bounds
has been removed, useglyph_bounds
instead. Pixel bound info is not available for OpenType glyphs without calculating outlines. I've found it's almost always better to useglyph_bounds
instead anyway, if not please open an issue with your use case.- Rename
gpu_cache_*
methods todraw_cache_*
. Also note, overriding the default position_tolerance may be less necessary as the new
draw cache features subpixel position error correction.// 0.7 GlyphBrushBuilder::using_font(font).draw_cache_position_tolerance(0.1).build()
// 0.6 GlyphBrushBuilder::using_font(font).gpu_cache_position_tolerance(0.1).build()
- Rename
cache_glyph_drawing
tocache_redraws
for clarity. - New crate glyph_brush_draw_cache takes rusttype's
gpu_cache
module into the ab_glyph world and starts to improve upon it. - New glyph_brush_layout now providers
section_index
&byte_index
for all laid out glyphs. It no longer relies on any pixel bounding box info, which isn't fast to query with .otf fonts. This also means invisible glyphs, like ' ', are now generally included and hence will be returned byGlyphCruncher::glyphs
. - Add
GlyphBrush::is_draw_cached
which can be used to tell if a given queued & processed glyph is visible or not. - It's faster. ~1.07-1.64x faster than
0.6
(particularly in the worst case full-layout performance).
Rasterization is also ~2-7x faster using ab_glyph_rasterizer.
gfx-glyph-0.17
- OpenType (.otf) fonts are now supported in addition to .ttf fonts.
- Rework crate switching from rusttype to ab_glyph. See glyph_brush changelog.
glyph-brush-layout-0.1.9
- Fix consistency of section bounds by removing usage of glyph pixel bounds during word layout, instead always relying on advance width.
- Fix possible floating point errors when using section bounds that exactly bound the section.
glyph-brush-0.6.3
- Fix section color & alpha frame to frame changes to be incorrectly optimised as alpha only changes.
glyph-brush-0.6.1
- Require
glyph_brush_layout
0.1.8
to help ensurerusttype
dependency convergence.
glyph-brush-layout-0.1.8
- Update rusttype ->
0.8
. Compatible with rusttype0.6.5
&0.7.9
.