diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-06-26 13:57:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-06-27 18:40:17 +0200 |
| commit | 7b92bd7c340d9f9c094ed2fa57912049317d9b20 (patch) | |
| tree | b91399526ba94d87309d09d864df2935dd7a4d0a /src/export | |
| parent | 9c7f31870b4e1bf37df79ebbe1df9a56df83d878 (diff) | |
Basic package management
Diffstat (limited to 'src/export')
| -rw-r--r-- | src/export/pdf/font.rs | 4 | ||||
| -rw-r--r-- | src/export/pdf/image.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/export/pdf/font.rs b/src/export/pdf/font.rs index d5de5118..f0676d8f 100644 --- a/src/export/pdf/font.rs +++ b/src/export/pdf/font.rs @@ -8,7 +8,7 @@ use unicode_general_category::GeneralCategory; use super::{deflate, EmExt, PdfContext, RefExt}; use crate::font::Font; -use crate::util::{Buffer, SliceExt}; +use crate::util::{Bytes, SliceExt}; const CMAP_NAME: Name = Name(b"Custom"); const SYSTEM_INFO: SystemInfo = SystemInfo { @@ -154,7 +154,7 @@ pub fn write_fonts(ctx: &mut PdfContext) { /// Subset a font to the given glyphs. #[comemo::memoize] -fn subset_font(font: &Font, glyphs: &[u16]) -> Buffer { +fn subset_font(font: &Font, glyphs: &[u16]) -> Bytes { let data = font.data(); let profile = subsetter::Profile::pdf(glyphs); let subsetted = subsetter::subset(data, font.index(), profile); diff --git a/src/export/pdf/image.rs b/src/export/pdf/image.rs index a7ec4744..48472d9f 100644 --- a/src/export/pdf/image.rs +++ b/src/export/pdf/image.rs @@ -5,7 +5,7 @@ use pdf_writer::{Filter, Finish}; use super::{deflate, PdfContext, RefExt}; use crate::image::{DecodedImage, Image, RasterFormat}; -use crate::util::Buffer; +use crate::util::Bytes; /// Embed all used images into the PDF. #[tracing::instrument(skip_all)] @@ -89,7 +89,7 @@ pub fn write_images(ctx: &mut PdfContext) { /// Skips the alpha channel as that's encoded separately. #[comemo::memoize] #[tracing::instrument(skip_all)] -fn encode_image(image: &Image) -> (Buffer, Filter, bool) { +fn encode_image(image: &Image) -> (Bytes, Filter, bool) { let decoded = image.decoded(); let (dynamic, format) = match decoded.as_ref() { DecodedImage::Raster(dynamic, _, format) => (dynamic, *format), |
