diff --git a/src/HTMLRenderer/text.cc b/src/HTMLRenderer/text.cc
index c8e6f8c..ca1b5c1 100644
--- a/src/HTMLRenderer/text.cc
+++ b/src/HTMLRenderer/text.cc
@@ -155,11 +155,6 @@ string HTMLRenderer::dump_embedded_font (GfxFont * font, long long fn_id)
void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo & info, bool get_metric_only)
{
- string suffix = get_suffix(filepath);
-
- for(auto iter = suffix.begin(); iter != suffix.end(); ++iter)
- *iter = tolower(*iter);
-
ff_load_font(filepath.c_str());
int * code2GID = nullptr;
@@ -168,7 +163,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
Gfx8BitFont * font_8bit = nullptr;
- info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode >= 0));
+ string suffix = get_suffix(filepath);
+ for(auto iter = suffix.begin(); iter != suffix.end(); ++iter)
+ *iter = tolower(*iter);
+
+ info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode > 0));
if(!get_metric_only)
{
diff --git a/src/pdf2htmlEX.cc b/src/pdf2htmlEX.cc
index 8400cf4..8b3fd31 100644
--- a/src/pdf2htmlEX.cc
+++ b/src/pdf2htmlEX.cc
@@ -137,7 +137,6 @@ int main(int argc, char **argv)
try
{
create_directories(param.dest_dir);
- create_directories(param.tmp_dir);
}
catch (const string & s)
{