diff --git a/services/graphics-server/src/blitstr2/codegen/config_editor.rb b/services/graphics-server/src/blitstr2/codegen/config_editor.rb index d5caf719c..676c199e9 100755 --- a/services/graphics-server/src/blitstr2/codegen/config_editor.rb +++ b/services/graphics-server/src/blitstr2/codegen/config_editor.rb @@ -99,6 +99,16 @@ config = { rustout: "../fonts/regular.rs", loaderout: "../../../../../loader/src/fonts/regular.rs", }, + # { + # name: "Tall", + # sprites: "src_data/latin_tall.png", size: 19, cols: 16, gutter: 1, border: 1, + # legal: "src_data/helvetica_legal.txt", + # index: latin_index_outfile, + # indexType: "json-grid-coord", + # glyphTrim: "proportional", + # rustout: "../fonts/tall.rs", + # loaderout: "../../../../../loader/src/fonts/tall.rs", + # }, { name: "Small", sprites: "src_data/latin_small.png", size: 12, cols: 16, gutter: 1, border: 1, diff --git a/services/graphics-server/src/blitstr2/codegen/lib/templates.go b/services/graphics-server/src/blitstr2/codegen/lib/templates.go index 03cc66366..7ba9c5e7a 100644 --- a/services/graphics-server/src/blitstr2/codegen/lib/templates.go +++ b/services/graphics-server/src/blitstr2/codegen/lib/templates.go @@ -119,22 +119,22 @@ pub const MAX_HEIGHT: u8 = {{.Font.Size}}; pub const CODEPOINTS: [u32; {{.GS.CodepointsLen}}] = [ {{.GS.Codepoints}}]; -#[cfg(any(target_os = "none", target_os = "xous"))] +#[cfg(any(feature="precursor", feature="renode"))] pub(crate) static GLYPH_LOCATION: core::sync::atomic::AtomicU32 = core::sync::atomic::AtomicU32::new(0); pub(crate) const GLYPH_LEN: usize = {{.GS.GlyphsLen}}; pub(crate) fn glyphs() -> &'static [u32] { - #[cfg(any(target_os = "none", target_os = "xous"))] + #[cfg(any(feature="precursor", feature="renode"))] unsafe { let data: *const u32 = core::mem::transmute(GLYPH_LOCATION.load(core::sync::atomic::Ordering::SeqCst)); core::slice::from_raw_parts(data, GLYPH_LEN) } - #[cfg(not(any(target_os = "none", target_os = "xous")))] + #[cfg(any(feature="precursor", feature="renode"))] &GLYPHS } -#[cfg(not(any(target_os = "none", target_os = "xous")))] +#[cfg(any(feature="precursor", feature="renode"))] /// Packed 16px * 16px glyph pattern data. /// Pixels are packed in row-major order with LSB of first pixel word /// containing the top left pixel. Bit of 0 means clear, 1 means set diff --git a/services/graphics-server/src/blitstr2/codegen/src_data/helvetica_legal.txt b/services/graphics-server/src/blitstr2/codegen/src_data/helvetica_legal.txt new file mode 100644 index 000000000..b3e109848 --- /dev/null +++ b/services/graphics-server/src/blitstr2/codegen/src_data/helvetica_legal.txt @@ -0,0 +1,4 @@ +// This code includes encoded bitmaps of glyphs from the Helvetica typeface. +// The PNG sprite sheets of Helvetica glyphs came from screenshots taken on +// Macintosh System 7, with additional Latin Extended characters added by Sam Blenny. +// diff --git a/services/graphics-server/src/blitstr2/codegen/src_data/latin_tall.png b/services/graphics-server/src/blitstr2/codegen/src_data/latin_tall.png new file mode 100644 index 000000000..ef622f047 Binary files /dev/null and b/services/graphics-server/src/blitstr2/codegen/src_data/latin_tall.png differ