[Teton] Load a font file and write a character to the screen.
This commit is contained in:
parent
96063126cb
commit
fe44804dd9
19 changed files with 412 additions and 17 deletions
|
|
@ -1,8 +1,10 @@
|
|||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <victoriafalls/victoriafalls.yunq.client.h>
|
||||
#include <yellowstone/yellowstone.yunq.client.h>
|
||||
|
||||
#include "framebuffer/framebuffer.h"
|
||||
#include "framebuffer/psf.h"
|
||||
|
||||
uint64_t main(uint64_t init_port) {
|
||||
ParseInitPort(init_port);
|
||||
|
|
@ -28,6 +30,23 @@ uint64_t main(uint64_t init_port) {
|
|||
|
||||
// 2. Parse a font file.
|
||||
|
||||
GetEndpointRequest req;
|
||||
req.set_endpoint_name("victoriafalls");
|
||||
Endpoint resp;
|
||||
check(client.GetEndpoint(req, resp));
|
||||
|
||||
VFSClient vfs(resp.endpoint());
|
||||
|
||||
OpenFileRequest freq;
|
||||
freq.set_path("/default8x16.psfu");
|
||||
OpenFileResponse fresp;
|
||||
check(vfs.OpenFile(freq, fresp));
|
||||
|
||||
Psf psf(OwnedMemoryRegion::FromCapability(fresp.memory()));
|
||||
psf.DumpHeader();
|
||||
|
||||
fbuf.DrawGlyph(psf.glyph('C'));
|
||||
|
||||
// 3. Write a line to the screen.
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue