Benign rust 44 installs download unavailable

typf-shape-hr 5.1.0

“Pure Rust text shaping backend for typf using harfrust”

Near-zero recent downloads for registry packageRelease published within seven days
SHA-25601dd4b653e068ce8c06db2894983de2abc4e6f1bab64bf7e61b713841a4d0e45
MaleculeMd₂(InPa)

Evidence

English function-word token "for" lines 3–5
3:54… ng text shaping without
4//! any C dependencies. This makes it ideal for environments where compiling
5//! HarfBuzz is difficult or when a fully auditable Rust dependenc …
imports harfrust::Direction as HrDirection lines 6–30
6:4… required.
7//!
8//! Performance is within 25% of the C HarfBuzz implementation for most fonts.
9
10use std::str::FromStr;
11use std::sync::Arc;
12
13use harfrust::{
14 Direction as HrDirection, Feature, FontRef as HrFontRef, GlyphBuffer, Language, Script,
15 ShaperData, ShaperInstance, Tag, UnicodeBuffer, Variation,
16};
17
18use typf_core::{
19 error::Result,
20 traits::{FontRef, Shaper, Stage},
21 types::{Direction, PositionedGlyph, ShapingResult},
22 ShapingParams,
23};
24
25// Re-export shared shaping cache from typf-core
26pub use typf_core::shaping_cache::{CacheStats, ShapingCache, ShapingCacheKey, SharedShapingCache};
27
28/// Pure Rust text shaping powered by harfrust
29///
30/// Optionally caches shaping results to avoid expensive re-shaping …
imports super::* lines 346–361
⋯4 lines
350}
351
352#[cfg(test)]
353mod tests {
354 use super::*;
355
356 struct TestFont {
⋯5 lines
#[test] attribute lines 373–381
373:21… idth(&self, _: u32) -> f32 {
374 500.0
375 }
376 }
377
378 #[test]
379 fn test_empty_text() {
380 let shaper = HarfrustShaper::new();
381 let font = Arc::new(TestFont { data: vec![] });
imports std::fs lines 396–409
⋯5 lines
401 #[cfg(target_os = "macos")]
402 fn test_with_system_font() {
403 use std::fs;
404
405 // Try to load Helvetica system font on macOS
⋯4 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.