Crate math_text_transform [−] [src]
Transform text from standard alphanumerical characters to it’s unicode equivalents of a certain variant in the mathematical alphanumeric symbols block (code block U+1D400–U+1D7FF).
use math_text_transform::math_italic; use math_text_transform::MathTextTransform; assert_eq!(math_italic('f'), Some('𝑓')); assert_eq!("Bold".to_math_bold(), "𝐁𝐨𝐥𝐝");
Supported variants are:
- 𝐛𝐨𝐥𝐝 (bold)
- 𝑖𝑡𝑎𝑙𝑖𝑐 (italic)
- 𝒃𝒐𝒍𝒅 𝒊𝒕𝒂𝒍𝒊𝒄 (bold italic)
- 𝗌𝖺𝗇𝗌-𝗌𝖾𝗋𝗂𝖿 (sans-serif)
- 𝘀𝗮𝗻𝘀-𝘀𝗲𝗿𝗶𝗳 𝗯𝗼𝗹𝗱 (sans-serif bold)
- 𝘴𝘢𝘯𝘴-𝘴𝘦𝘳𝘪𝘧 𝘪𝘵𝘢𝘭𝘪𝘤 (sans-serif italic)
- 𝙨𝙖𝙣𝙨-𝙨𝙚𝙧𝙞𝙛 𝙗𝙤𝙡𝙙 𝙞𝙩𝙖𝙡𝙞𝙘 (sans-serif bold italic)
- 𝓈𝒸𝓇𝒾𝓅𝓉 (script)
- 𝓫𝓸𝓵𝓭 𝓼𝓬𝓻𝓲𝓹𝓽 (bold script)
- 𝔣𝔯𝔞𝔨𝔱𝔲𝔯 (fraktur)
- 𝖇𝖔𝖑𝖉 𝖋𝖗𝖆𝖐𝖙𝖚𝖗 (bold fraktur)
- 𝚖𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎 (monospace)
- 𝕕𝕠𝕦𝕓𝕝𝕖-𝕤𝕥𝕣𝕦𝕔𝕜 (double-struck)
References
Reexports
pub use self::bold::math_bold; |
pub use self::italic::math_italic; |
pub use self::bold_italic::math_bold_italic; |
pub use self::sans_serif::math_sans_serif; |
pub use self::sans_serif_bold::math_sans_serif_bold; |
pub use self::sans_serif_italic::math_sans_serif_italic; |
pub use self::sans_serif_bold_italic::math_sans_serif_bold_italic; |
pub use self::script::math_script; |
pub use self::bold_script::math_bold_script; |
pub use self::fraktur::math_fraktur; |
pub use self::bold_fraktur::math_bold_fraktur; |
pub use self::monospace::math_monospace; |
pub use self::double_struck::math_double_struck; |
Traits
MathTextTransform |
Convenience trait that allows you to call the the transformation straight on a string slice. If a variant doesn't exist for a given character, it is left as is. |