style: Move fixed-point font types to Rust

Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
This commit is contained in:
Emilio Cobos Álvarez 2022-06-13 00:59:23 +00:00 committed by Martin Robinson
parent 48749641d3
commit dcafbde256
10 changed files with 401 additions and 326 deletions

View file

@ -143,7 +143,10 @@ pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: &
let ident = &data.ident;
GenericArgument::Type(parse_quote!(<#ident as #trait_path>::#trait_output))
},
ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
&GenericParam::Const(ref inner) => {
let ident = &inner.ident;
GenericArgument::Const(parse_quote!(#ident))
},
})
.collect(),
colon2_token: Default::default(),