Commit b391df78 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

remove obsolete font search path

parent 4e302fa9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -48,14 +48,6 @@ Document::Document() :
    border_colour(Colour::fromRGB(.66,.66,.66)) {}

ReturnCode document_setup_defaults(Document* doc) {
  if (auto path = getenv("PLOTFX_FONT_PATH"); path) {
    auto path_parts = StringUtil::split(path, ":");
    doc->font_searchpath.insert(
        doc->font_searchpath.end(),
        path_parts.begin(),
        path_parts.end());
  }

  if (!font_load(DefaultFont::HELVETICA_REGULAR, &doc->font_sans)) {
    return ReturnCode::error(
        "EARG",
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ struct Document {
  FontInfo font_serif;
  FontInfo font_sans;
  FontInfo font_mono;
  std::vector<std::string> font_searchpath;
  std::vector<ElementRef> roots;
};

+0 −16
Original line number Diff line number Diff line
@@ -34,22 +34,6 @@

namespace plotfx {

bool findFontSimple(
    const std::string& font_name,
    const std::vector<std::string>& search_paths,
    FontInfo* font) {
  for (const auto& p : search_paths) {
    auto candidate = FileUtil::joinPaths(p, font_name + ".ttf");
    if (FileUtil::exists(candidate)) {
      *font = FontInfo {
        .font_file = candidate
      };
      return true;
    }
  }

  return false;
}

bool findFontSystem(
    const std::string& font_pattern,
+0 −5
Original line number Diff line number Diff line
@@ -33,11 +33,6 @@

namespace plotfx {

bool findFontSimple(
    const std::string& font_name,
    const std::vector<std::string>& search_paths,
    FontInfo* font_file);

bool findFontSystem(
    const std::string& font_pattern,
    std::string* font_file);
+0 −2
Original line number Diff line number Diff line
@@ -7,8 +7,6 @@ print_error () {
  printf "\033[0m\n"
}

export PLOTFX_FONT_PATH="$(pwd)/extra/fonts"

binfile="$1"
specfile="$2"
outfile="$3"