#pragma once

#include <daguerre/fixed-font.hpp>
#include <optional>
#include <cstdio>

namespace daguerre {

  std::optional<fixed_font<bool>> try_load_psf(FILE *input);

  static inline std::optional<fixed_font<bool>> try_load_psf(const char *path) {
    FILE *f = fopen(path, "r");
    if (!f)
      return {};
    auto result = try_load_psf(f);
    fclose(f);
    return result;
  }

}
