mirror of
https://github.com/rhaleblian/dslibris.git
synced 2025-06-19 09:15:36 -04:00
Add path separator.
This commit is contained in:
parent
2efbfad532
commit
693669fdff
@ -191,6 +191,7 @@ u8 Book::Open() {
|
|||||||
app->PrintStatus("opening EPUB...\n");
|
app->PrintStatus("opening EPUB...\n");
|
||||||
std::string path;
|
std::string path;
|
||||||
path.append(GetFolderName());
|
path.append(GetFolderName());
|
||||||
|
path.append("/");
|
||||||
path.append(GetFileName());
|
path.append(GetFileName());
|
||||||
err = epub(this,path,false);
|
err = epub(this,path,false);
|
||||||
} else
|
} else
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
// https://www.willusher.io/sdl2%20tutorials/2013/08/17/lesson-1-hello-world
|
// https://www.willusher.io/sdl2%20tutorials/2013/08/17/lesson-1-hello-world
|
||||||
|
|
||||||
#define ASCIIART // We are building under ARM without SDL
|
#define ASCIIART // We are building under ARM without SDL
|
||||||
|
#define D 512
|
||||||
|
|
||||||
#ifndef ASCIIART
|
#ifndef ASCIIART
|
||||||
#include "SDL2/SDL.h"
|
#include "SDL2/SDL.h"
|
||||||
@ -11,12 +12,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "ft2build.h"
|
#include "ft2build.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include FT_FREETYPE_H
|
|
||||||
#include FT_CACHE_H
|
|
||||||
|
|
||||||
#include "ft.h"
|
#include "ft.h"
|
||||||
|
#include FT_ERRORS_H
|
||||||
|
|
||||||
#define D 512
|
#include "log.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *path;
|
char *path;
|
||||||
@ -32,7 +32,7 @@ FT_Error requester(FTC_FaceID face_id, FT_Library library, FT_Pointer req_data,
|
|||||||
FT_Freeables typesetter() {
|
FT_Freeables typesetter() {
|
||||||
// char filepath[128] =
|
// char filepath[128] =
|
||||||
// "/home/ray/GitHub/dslibris/cflash/font/LiberationSerif-Regular.ttf";
|
// "/home/ray/GitHub/dslibris/cflash/font/LiberationSerif-Regular.ttf";
|
||||||
char filepath[128] = "/font/LiberationSerif-Regular.ttf";
|
char filepath[128] = "/Font/regular.ttf";
|
||||||
const uint char_code = 38; // ASCII &
|
const uint char_code = 38; // ASCII &
|
||||||
Designator designator;
|
Designator designator;
|
||||||
designator.path = filepath;
|
designator.path = filepath;
|
||||||
@ -50,10 +50,13 @@ FT_Freeables typesetter() {
|
|||||||
FT_Glyph glyph;
|
FT_Glyph glyph;
|
||||||
FTC_Node node;
|
FTC_Node node;
|
||||||
FTC_CMapCache cmcache;
|
FTC_CMapCache cmcache;
|
||||||
|
char msg[256];
|
||||||
|
|
||||||
FT_Error error = FT_Init_FreeType(&library);
|
FT_Error error = FT_Init_FreeType(&library);
|
||||||
if (error)
|
if (error) {
|
||||||
; // shush g++.
|
sprintf(msg, "error: init: %d\n", error);
|
||||||
|
Log(msg);
|
||||||
|
}
|
||||||
|
|
||||||
error =
|
error =
|
||||||
FTC_Manager_New(library, 1, 1, 1000000, requester, &designator, &manager);
|
FTC_Manager_New(library, 1, 1, 1000000, requester, &designator, &manager);
|
||||||
|
Loading…
Reference in New Issue
Block a user