mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
add small font directory for loader
This commit is contained in:
parent
2cb295ccf0
commit
ce78a24e10
1 changed files with 9 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ func codegen() {
|
||||||
conf := NewConfig("config.json")
|
conf := NewConfig("config.json")
|
||||||
fsList := conf.Fonts()
|
fsList := conf.Fonts()
|
||||||
var fdir []FontSummary
|
var fdir []FontSummary
|
||||||
|
var small_fdir []FontSummary
|
||||||
var offsets []FontMap
|
var offsets []FontMap
|
||||||
var small_offsets []FontMap
|
var small_offsets []FontMap
|
||||||
var cur_address int = 0
|
var cur_address int = 0
|
||||||
|
|
@ -64,6 +65,9 @@ func codegen() {
|
||||||
Len: gs.GlyphsLen,
|
Len: gs.GlyphsLen,
|
||||||
}
|
}
|
||||||
fdir = append(fdir, summary)
|
fdir = append(fdir, summary)
|
||||||
|
if f.Small {
|
||||||
|
small_fdir = append(small_fdir, summary)
|
||||||
|
}
|
||||||
|
|
||||||
offset := lib.FontMap{
|
offset := lib.FontMap{
|
||||||
Name: strings.ToUpper(f.Name) + "_OFFSET",
|
Name: strings.ToUpper(f.Name) + "_OFFSET",
|
||||||
|
|
@ -71,6 +75,10 @@ func codegen() {
|
||||||
}
|
}
|
||||||
offsets = append(offsets, offset)
|
offsets = append(offsets, offset)
|
||||||
if f.Small {
|
if f.Small {
|
||||||
|
offset := lib.FontMap{
|
||||||
|
Name: strings.ToUpper(f.Name) + "_OFFSET",
|
||||||
|
Len: fmt.Sprintf("%x", small_cur_address),
|
||||||
|
}
|
||||||
small_offsets = append(small_offsets, offset)
|
small_offsets = append(small_offsets, offset)
|
||||||
}
|
}
|
||||||
length := lib.FontMap{
|
length := lib.FontMap{
|
||||||
|
|
@ -99,7 +107,7 @@ func codegen() {
|
||||||
for _, fs := range fdir {
|
for _, fs := range fdir {
|
||||||
fmt.Println(fs)
|
fmt.Println(fs)
|
||||||
}
|
}
|
||||||
loadermod := RenderLoadermodTemplate(fdir)
|
loadermod := RenderLoadermodTemplate(fdir, small_fdir)
|
||||||
fmt.Println("Writing to", conf.GetLoaderMod())
|
fmt.Println("Writing to", conf.GetLoaderMod())
|
||||||
ioutil.WriteFile(conf.GetLoaderMod(), []byte(loadermod), 0644)
|
ioutil.WriteFile(conf.GetLoaderMod(), []byte(loadermod), 0644)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue