Skip to content

Instantly share code, notes, and snippets.

@brimston3
brimston3 / clfontpng.cc
Last active December 11, 2023 23:43 — forked from jokertarot/clfontpng.cc
How to render color emoji font with FreeType 2.12
// = Requirements: freetype >=2.5, libpng, libicu, libz, libzip2,
// = with freetype >=2.10, libbrotli
// = How to compile:
// % export CXXFLAGS=`pkg-config --cflags freetype2 libpng`
// % export LDFLAGS=`pkg-config --libs freetype2 libpng libbrotlidec libbrotlicommon`
// % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \
// -licuuc -lz -lbz2
#include <cassert>
#include <cctype>
#include <iostream>
// Put this in a separate .h file (called "getopt.h").
// The prototype for the header file is:
/*
#ifndef GETOPT_H
#define GETOPT_H
int getopt(int nargc, char * const nargv[], const char *ostr) ;
#endif
*/
@ECHO OFF
REM -- Automates cygwin installation
SETLOCAL
REM -- Change to the directory of the executing batch file
CD %~dp0
REM -- Configure our paths
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/