Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Emscripten's FreeType fails to open NotoColorEmoji with "unknown file format" #3

@albertvaka

Description

@albertvaka

Google Noto is a family of free fonts. Within it, NotoColorEmoji contains all emojis, but no regular characters. It can be downloaded from the official site: https://www.google.com/get/noto/

Emscripten's port of FreeType fails to read NotoColorEmoji, but the same code works compiled natively.

Test program:

#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_ERRORS_H
int main() {
	FT_Library ft;
	FT_Face ftface;
  	FT_Error fterr;
  	fterr = FT_Init_FreeType(&ft);
  	if (fterr) {
	    printf("FT_Init_FreeType: %s\n", GetErrorString(fterr));
	    return;
  	}
	fterr = FT_New_Face(ft, "data/NotoColorEmoji.ttf", 0, &ftface);
	if (fterr) {
		printf("FT_New_Face: %s\n", GetErrorString(fterr));
		return;
	}
}

Output:

FT_New_Face: unknown file format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions