Commit 273c949f authored by Peter Kovář's avatar Peter Kovář

WIP

parent 495f1d51
Pipeline #16597 failed with stage
......@@ -2,6 +2,9 @@
#define __FONTASY_H__
#include <PEAK/Types.h>
#include <raqm.h>
#include <stdbool.h>
#include <stdint.h>
#include <vulkan/vulkan.h>
#include "Fontasy/vertex-buffer.h"
......@@ -20,4 +23,6 @@ using namespace fontasy;
#endif /* NOT_USING_FONTASY_NAMESPACE */
#endif /* __cplusplus */
int fontasy_line (raqm_t **rq, char* text, uint length, char *language, FT_Face font);
#endif /* FONTASY_H */
......@@ -3,3 +3,46 @@
#include <stdlib.h>
#include <string.h>
#include "Fontasy.h"
#include <ft2build.h>
#include FT_IMAGE_H
#include FT_TYPES_H
int fontasy_line (raqm_t **rq, char* text, uint length, char *language, FT_Face font)
{
raqm_t *line;
bool result;
line = raqm_create ();
if (line == NULL)
{
return -1;
}
result = raqm_set_text_utf8 (line, text, length);
if (result == false)
{
return -2;
}
result = raqm_set_language (line, language, 0, length);
if (result == false)
{
return -3;
}
result = raqm_set_freetype_face (line, font);
if (result == false)
{
return -4;
}
result = raqm_layout (line);
if (result == false)
{
return -5;
}
*rq = line;
return 0;
}
......@@ -22,10 +22,11 @@ RAQM = raqm
COMPONENTS = $(FONTCONFIG) $(FREETYPE) $(FRIBIDI) $(HARFBUZZ) $(RAQM)
CFLAGS += --lto
CFLAGS += -I../Headers -I../Headers/Fontasy
CFLAGS += `$(PKGCONFIG) --cflags $(COMPONENTS)`
LDFLAGS += --lto
LIBS = -lvulkan
LIBS += `$(PKGCONFIG) --libs $(COMPONENTS)`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment