Font does not need to store index, it is part of info

This commit is contained in:
Jeremy Soller 2022-10-25 19:17:40 -06:00
parent 3e8e28f0b3
commit 22036a0f9e

View file

@ -5,7 +5,6 @@ use std::ops::Deref;
pub struct Font<'a> {
pub info: &'a fontdb::FaceInfo,
pub data: &'a [u8],
pub index: u32,
pub rustybuzz: rustybuzz::Face<'a>,
#[cfg(feature = "swash")]
pub swash: (u32, swash::CacheKey),
@ -25,7 +24,6 @@ impl<'a> Font<'a> {
Some(Self {
info,
data,
index: info.index,
rustybuzz: rustybuzz::Face::from_slice(data, info.index)?,
#[cfg(feature = "swash")]
swash: {