mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
check in inital artifacts, but leave the system inert
more hacking is necessary before we can really run these scripts
This commit is contained in:
parent
ced2502559
commit
22e0e06625
4 changed files with 18 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
//
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in a new issue