-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathfont.cpp
More file actions
29 lines (25 loc) · 750 Bytes
/
Copy pathfont.cpp
File metadata and controls
29 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* Copyright (C) 2026 Shitty team
* MIT licensed
* See the file LICENSE.MIT for the full license.
*/
#include "font.h"
#include "font_renderer.h"
#include "font_freetype.h"
// font_freetype.cpp only enters the build when the FreeType backend is
// available; this stub keeps the factory linkable everywhere else.
#if !(defined(HAVE_FREETYPE) && defined(HAVE_HARFBUZZ))
FontRenderer* createFreeTypeFontRenderer(Composer& composer) {
(void)(composer);
return nullptr;
}
#endif
bool puaSymbol(u32 codepoint) {
if (codepoint >= 0xe000 && codepoint <= 0xf8ff) {
return true;
}
if (codepoint >= 0xf0000 && codepoint <= 0xffffd) {
return true;
}
return codepoint >= 0x100000 && codepoint <= 0x10fffd;
}