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