update harfbuzz to 10.1.0

This commit is contained in:
Sasha Szpakowski
2024-11-08 20:45:28 -04:00
parent 7ca40027e0
commit aecb572558
3449 changed files with 101770 additions and 22266 deletions
+47 -3
View File
@@ -38,19 +38,23 @@
#include <locale.h>
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for isatty() */
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
#include <io.h> /* for setmode() under Windows */
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for isatty() */
#endif
#include <hb-features.h>
#include <hb.h>
#include <hb-ot.h>
#include <glib.h>
#include <glib/gprintf.h>
static inline void fail (hb_bool_t suggest_help, const char *format, ...) G_GNUC_NORETURN G_GNUC_PRINTF (2, 3);
static inline void
@@ -241,4 +245,44 @@ __inline float scalbnf (float x, int exp)
}
#endif
static inline bool
parse_color (const char *s,
unsigned &r,
unsigned &g,
unsigned &b,
unsigned &a)
{
bool ret = false;
while (*s == ' ') s++;
if (*s == '#') s++;
unsigned sr, sg, sb, sa;
sa = 255;
if (sscanf (s, "%2x%2x%2x%2x", &sr, &sg, &sb, &sa) <= 2)
{
if (sscanf (s, "%1x%1x%1x%1x", &sr, &sg, &sb, &sa) >= 3)
{
sr *= 17;
sg *= 17;
sb *= 17;
sa *= 17;
ret = true;
}
}
else
ret = true;
if (ret)
{
r = sr;
g = sg;
b = sb;
a = sa;
}
return ret;
}
#endif