From 22e0e0662588c5be2762f635bc36ec81882c9a21 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 4 Jul 2023 10:29:43 +0800 Subject: [PATCH] check in inital artifacts, but leave the system inert more hacking is necessary before we can really run these scripts --- .../src/blitstr2/codegen/config_editor.rb | 10 ++++++++++ .../src/blitstr2/codegen/lib/templates.go | 8 ++++---- .../codegen/src_data/helvetica_legal.txt | 4 ++++ .../src/blitstr2/codegen/src_data/latin_tall.png | Bin 0 -> 3949 bytes 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 services/graphics-server/src/blitstr2/codegen/src_data/helvetica_legal.txt create mode 100644 services/graphics-server/src/blitstr2/codegen/src_data/latin_tall.png 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 0000000000000000000000000000000000000000..ef622f047bdb0ddffa25507b9ad0b05bfb5b9e9a GIT binary patch literal 3949 zcmV-z50dbSP)YNHs~vX0u| z|6Vlyj=!uo!QZqBtVdl*q-3_AD`K(aKA0U z)da11&_{6hc<1*MZ4iM`yfKD#^B`LHeTE2<8;NT>p9kSxi+5vqLOSKi^4ky`aSgYYlsnqc#Zq=ha; z5QIi>VkhOdL4B_g^Z1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