1use crate::{
2 Bounds, DevicePixels, Font, FontId, FontMetrics, FontRun, GlyphId, LineLayout, Pixels,
3 PlatformTextSystem, RenderGlyphParams, Size,
4};
5use anyhow::Result;
6use std::borrow::Cow;
7
8pub(crate) struct TestTextSystem {}
9
10#[allow(unused)]
11impl PlatformTextSystem for TestTextSystem {
12 fn add_fonts(&self, fonts: Vec<Cow<'static, [u8]>>) -> Result<()> {
13 unimplemented!()
14 }
15 fn all_font_names(&self) -> Vec<String> {
16 unimplemented!()
17 }
18 fn all_font_families(&self) -> Vec<String> {
19 unimplemented!()
20 }
21 fn font_id(&self, descriptor: &Font) -> Result<FontId> {
22 unimplemented!()
23 }
24 fn font_metrics(&self, font_id: FontId) -> FontMetrics {
25 unimplemented!()
26 }
27 fn typographic_bounds(&self, font_id: FontId, glyph_id: GlyphId) -> Result<Bounds<f32>> {
28 unimplemented!()
29 }
30 fn advance(&self, font_id: FontId, glyph_id: GlyphId) -> Result<Size<f32>> {
31 unimplemented!()
32 }
33 fn glyph_for_char(&self, font_id: FontId, ch: char) -> Option<GlyphId> {
34 unimplemented!()
35 }
36 fn glyph_raster_bounds(&self, params: &RenderGlyphParams) -> Result<Bounds<DevicePixels>> {
37 unimplemented!()
38 }
39 fn rasterize_glyph(
40 &self,
41 params: &RenderGlyphParams,
42 raster_bounds: Bounds<DevicePixels>,
43 ) -> Result<(Size<DevicePixels>, Vec<u8>)> {
44 unimplemented!()
45 }
46 fn layout_line(&self, text: &str, font_size: Pixels, runs: &[FontRun]) -> LineLayout {
47 unimplemented!()
48 }
49 fn wrap_line(
50 &self,
51 text: &str,
52 font_id: FontId,
53 font_size: Pixels,
54 width: Pixels,
55 ) -> Vec<usize> {
56 unimplemented!()
57 }
58}