owned_ttf_parser/
convert.rs
1pub trait AsFaceRef {
3 fn as_face_ref(&self) -> &ttf_parser::Face<'_>;
5}
6
7impl AsFaceRef for ttf_parser::Face<'_> {
8 #[inline]
9 fn as_face_ref(&self) -> &ttf_parser::Face<'_> {
10 self
11 }
12}
13
14impl AsFaceRef for &ttf_parser::Face<'_> {
15 #[inline]
16 fn as_face_ref(&self) -> &ttf_parser::Face<'_> {
17 self
18 }
19}
20
21pub trait FaceMut {
23 fn set_variation(&mut self, axis: ttf_parser::Tag, value: f32) -> Option<()>;
27}
28impl FaceMut for ttf_parser::Face<'_> {
29 #[inline]
30 fn set_variation(&mut self, axis: ttf_parser::Tag, value: f32) -> Option<()> {
31 ttf_parser::Face::set_variation(self, axis, value)
32 }
33}
34impl FaceMut for &mut ttf_parser::Face<'_> {
35 #[inline]
36 fn set_variation(&mut self, axis: ttf_parser::Tag, value: f32) -> Option<()> {
37 ttf_parser::Face::set_variation(self, axis, value)
38 }
39}