Fix Lua subproject ofr Mac OS X

This commit is contained in:
Francesco Abbate 2020-06-29 17:01:14 +02:00
parent fa649521d2
commit 1fc6d62b14
4 changed files with 11 additions and 7 deletions

View File

@ -14,12 +14,12 @@ struct FR_Bitmap {
int width, height;
};
class FR_Impl {
class FR_Renderer {
public:
// Conventional LUT values: (1./3., 2./9., 1./9.)
// The values below are fine tuned as in the Elementary Plot library.
FR_Impl(bool hinting, bool kerning, bool subpixel, bool prescale_x) :
FR_Renderer(bool hinting, bool kerning, bool subpixel, bool prescale_x) :
m_renderer(hinting, kerning, subpixel, prescale_x),
m_lcd_lut(0.448, 0.184, 0.092),
m_subpixel(subpixel)
@ -40,7 +40,7 @@ FR_Renderer *FR_Renderer_New(unsigned int flags) {
bool kerning = ((flags & FR_KERNING) != 0);
bool subpixel = ((flags & FR_SUBPIXEL) != 0);
bool prescale_x = ((flags & FR_PRESCALE_X) != 0);
return new FR_Impl(hinting, kerning, subpixel, prescale_x);
return new FR_Renderer(hinting, kerning, subpixel, prescale_x);
}
FR_Bitmap* FR_Bitmap_New(FR_Renderer *font_renderer, int width, int height) {

View File

@ -14,8 +14,12 @@ typedef struct {
typedef struct FR_Bitmap FR_Bitmap;
struct FR_Impl;
typedef struct FR_Impl FR_Renderer;
#ifdef __cplusplus
class FR_Renderer;
#else
struct FR_Renderer;
typedef struct FR_Renderer FR_Renderer;
#endif
enum {
FR_HINTING = 1 << 0,

View File

@ -4,7 +4,7 @@ cc = meson.get_compiler('c')
libm = cc.find_library('m', required : false)
libdl = cc.find_library('dl', required : false)
lua_subproject = subproject('lua', default_options: [])
lua_subproject = subproject('lua', default_options: ['use_readline=false'])
lua_dep = lua_subproject.get_variable('lua_dep')
sdl_dep = dependency('sdl2', method: 'config-tool')

View File

@ -1,4 +1,4 @@
[wrap-git]
directory = lua
url = https://github.com/franko/lua
revision = v5.2.4-4
revision = v5.2.4-5