mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-10 19:44:43 +03:00
Fix framebuffer build.
svn path=/trunk/netsurf/; revision=13222
This commit is contained in:
parent
e2a7600e9a
commit
ebebdfda4b
@ -83,6 +83,22 @@ utf8_convert_ret utf8_to_local_encoding(const char *string,
|
||||
return utf8_to_enc(string, "UTF-8", len, result);
|
||||
}
|
||||
|
||||
utf8_convert_ret utf8_from_local_encoding(const char *string,
|
||||
size_t len,
|
||||
char **result)
|
||||
{
|
||||
*result = malloc(len + 1);
|
||||
if (*result == NULL) {
|
||||
return UTF8_CONVERT_NOMEM;
|
||||
}
|
||||
|
||||
memcpy(*result, string, len);
|
||||
|
||||
(*result)[len] = '\0';
|
||||
|
||||
return UTF8_CONVERT_OK;
|
||||
}
|
||||
|
||||
/* map cache manager handle to face id */
|
||||
static FT_Error ft_face_requester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *face )
|
||||
{
|
||||
|
@ -70,6 +70,22 @@ utf8_convert_ret utf8_to_local_encoding(const char *string,
|
||||
|
||||
}
|
||||
|
||||
utf8_convert_ret utf8_from_local_encoding(const char *string,
|
||||
size_t len,
|
||||
char **result)
|
||||
{
|
||||
*result = malloc(len + 1);
|
||||
if (*result == NULL) {
|
||||
return UTF8_CONVERT_NOMEM;
|
||||
}
|
||||
|
||||
memcpy(*result, string, len);
|
||||
|
||||
(*result)[len] = '\0';
|
||||
|
||||
return UTF8_CONVERT_OK;
|
||||
}
|
||||
|
||||
static bool nsfont_width(const plot_font_style_t *fstyle,
|
||||
const char *string, size_t length,
|
||||
int *width)
|
||||
|
Loading…
x
Reference in New Issue
Block a user