summaryrefslogtreecommitdiffstats
path: root/src/detection/font/font.c
blob: c651f29bd0fa97a199bc3782e80f4cc3f9d0d2dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "font.h"

const char* ffDetectFontImpl(FFFontResult* font);

const char* ffDetectFont(FFFontResult* font) {
    const char* error = ffDetectFontImpl(font);

    if (error) {
        return error;
    }

    for (uint32_t i = 0; i < FF_DETECT_FONT_NUM_FONTS; ++i) {
        if (font->fonts[i].length > 0) {
            return NULL;
        }
    }

    return "No fonts found";
}