[poppler] 2 commits - cmake/modules cpp/poppler-document.cpp cpp/poppler-image.cpp cpp/poppler-page.cpp cpp/poppler-private.cpp cpp/poppler-toc.cpp cpp/tests fofi/FoFiBase.cc fofi/FoFiEncodings.cc fofi/FoFiIdentifier.cc fofi/FoFiTrueType.cc fofi/FoFiType1.cc fofi/FoFiType1C.cc glib/CMakeLists.txt glib/demo glib/poppler-action.cc glib/poppler-annot.cc glib/poppler-attachment.cc glib/poppler-cached-file-loader.cc glib/poppler.cc glib/poppler-document.cc glib/poppler-form-field.cc glib/poppler-input-stream.cc glib/poppler-layer.cc glib/poppler-media.cc glib/poppler-movie.cc glib/poppler-page.cc glib/poppler-structure-element.cc goo/gfile.cc goo/gmem.cc goo/GooHash.cc goo/GooString.cc goo/GooTimer.cc goo/grandom.cc goo/gstrtod.cc goo/PNGWriter.cc goo/TiffWriter.cc poppler/Annot.cc poppler/Array.cc poppler/BuiltinFont.cc poppler/BuiltinFontTables.cc poppler/CairoFontEngine.cc poppler/CairoOutputDev.cc poppler/CairoRescaleBox.cc poppler/Catalog.cc poppler/CharCodeToUnicode.cc poppler/CMap.c c poppler/CurlCachedFile.cc poppler/DateInfo.cc poppler/DCTStream.cc poppler/Decrypt.cc poppler/Dict.cc poppler/Error.cc poppler/FileSpec.cc poppler/FontEncodingTables.cc poppler/FontInfo.cc poppler/Form.cc poppler/Function.cc poppler/Gfx.cc poppler/GfxFont.cc poppler/GfxState.cc poppler/GlobalParams.cc poppler/GlobalParamsWin.cc poppler/Hints.cc poppler/JArithmeticDecoder.cc poppler/JBIG2Stream.cc poppler/JPEG2000Stream.cc poppler/Lexer.cc poppler/Linearization.cc poppler/Link.cc poppler/MarkedContentOutputDev.cc poppler/Movie.cc poppler/NameToCharCode.cc poppler/NameToUnicodeTable.h poppler/OptionalContent.cc poppler/Outline.cc poppler/OutputDev.cc poppler/Page.cc poppler/PageLabelInfo.cc poppler/Parser.cc poppler/PDFDoc.cc poppler/PopplerCache.cc poppler/PSOutputDev.cc poppler/PSOutputDev.h poppler/Rendition.cc poppler/SecurityHandler.cc poppler/SignatureHandler.cc poppler/Sound.cc poppler/SplashOutputDev.cc poppler/StdinCachedFile.cc poppler/StdinPDFDocBuilder.cc poppler/Stream. cc poppler/StructElement.cc poppler/StructElement.h poppler/StructTreeRoot.cc poppler/StructTreeRoot.h poppler/TextOutputDev.cc poppler/UnicodeMap.cc poppler/UnicodeTypeTable.cc poppler/UTF.cc poppler/XRef.cc qt5/demos qt5/src qt5/tests splash/SplashBitmap.cc splash/Splash.cc splash/SplashClip.cc splash/SplashFont.cc splash/SplashFontEngine.cc splash/SplashFontFile.cc splash/SplashFTFont.cc splash/SplashFTFontEngine.cc splash/SplashFTFontFile.cc splash/SplashPath.cc splash/SplashScreen.cc splash/SplashState.cc splash/SplashXPath.cc splash/SplashXPathScanner.cc test/CMakeLists.txt test/gtk-test.cc test/pdf-fullrewrite.cc test/pdf-inspector.cc test/perf-test.cc utils/HtmlFonts.cc utils/HtmlLinks.cc utils/HtmlOutputDev.cc utils/ImageOutputDev.cc utils/JSInfo.cc utils/parseargs.cc utils/pdfdetach.cc utils/pdffonts.cc utils/pdfimages.cc utils/pdfinfo.cc utils/pdfseparate.cc utils/pdfsig.cc utils/pdftocairo.cc utils/pdftocairo-win32.cc utils/pdftohtml.cc utils/pdftoppm.cc utils/pdftops.cc utils/pdftotext.cc utils/pdfunite.cc utils/Win32Console.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Jan 8 21:57:41 UTC 2018


 cmake/modules/PopplerDefaults.cmake |    8 
 cmake/modules/PopplerMacros.cmake   |    2 
 cpp/poppler-document.cpp            |   50 
 cpp/poppler-image.cpp               |   20 
 cpp/poppler-page.cpp                |    8 
 cpp/poppler-private.cpp             |    2 
 cpp/poppler-toc.cpp                 |    4 
 cpp/tests/poppler-dump.cpp          |    2 
 cpp/tests/poppler-render.cpp        |    2 
 fofi/FoFiBase.cc                    |   10 
 fofi/FoFiEncodings.cc               |  396 -
 fofi/FoFiIdentifier.cc              |    2 
 fofi/FoFiTrueType.cc                |   30 
 fofi/FoFiType1.cc                   |   18 
 fofi/FoFiType1C.cc                  |   28 
 glib/CMakeLists.txt                 |    4 
 glib/demo/info.cc                   |   12 
 glib/poppler-action.cc              |   54 
 glib/poppler-annot.cc               |   64 
 glib/poppler-attachment.cc          |   12 
 glib/poppler-cached-file-loader.cc  |   16 
 glib/poppler-document.cc            |  246 -
 glib/poppler-form-field.cc          |   30 
 glib/poppler-input-stream.cc        |   14 
 glib/poppler-layer.cc               |   16 
 glib/poppler-media.cc               |   10 
 glib/poppler-movie.cc               |    6 
 glib/poppler-page.cc                |  124 
 glib/poppler-structure-element.cc   |  200 
 glib/poppler.cc                     |    8 
 goo/GooHash.cc                      |   24 
 goo/GooString.cc                    |   16 
 goo/GooTimer.cc                     |    6 
 goo/PNGWriter.cc                    |    6 
 goo/TiffWriter.cc                   |   18 
 goo/gfile.cc                        |   26 
 goo/gmem.cc                         |   18 
 goo/grandom.cc                      |    4 
 goo/gstrtod.cc                      |   10 
 poppler/Annot.cc                    |  300 -
 poppler/Array.cc                    |    2 
 poppler/BuiltinFont.cc              |    2 
 poppler/BuiltinFontTables.cc        | 8374 ++++++++++++++++++------------------
 poppler/CMap.cc                     |   22 
 poppler/CairoFontEngine.cc          |   42 
 poppler/CairoOutputDev.cc           |  108 
 poppler/CairoRescaleBox.cc          |    6 
 poppler/Catalog.cc                  |   76 
 poppler/CharCodeToUnicode.cc        |   28 
 poppler/CurlCachedFile.cc           |    6 
 poppler/DCTStream.cc                |   16 
 poppler/DateInfo.cc                 |    4 
 poppler/Decrypt.cc                  |    4 
 poppler/Dict.cc                     |    8 
 poppler/Error.cc                    |    4 
 poppler/FileSpec.cc                 |   18 
 poppler/FontEncodingTables.cc       |  980 ++--
 poppler/FontInfo.cc                 |   22 
 poppler/Form.cc                     |   70 
 poppler/Function.cc                 |   26 
 poppler/Gfx.cc                      |  146 
 poppler/GfxFont.cc                  |  134 
 poppler/GfxState.cc                 |  346 -
 poppler/GlobalParams.cc             |   76 
 poppler/GlobalParamsWin.cc          |  170 
 poppler/Hints.cc                    |   18 
 poppler/JArithmeticDecoder.cc       |    2 
 poppler/JBIG2Stream.cc              |  202 
 poppler/JPEG2000Stream.cc           |   22 
 poppler/Lexer.cc                    |    8 
 poppler/Linearization.cc            |   16 
 poppler/Link.cc                     |   52 
 poppler/MarkedContentOutputDev.cc   |   22 
 poppler/Movie.cc                    |    2 
 poppler/NameToCharCode.cc           |    4 
 poppler/NameToUnicodeTable.h        |    4 
 poppler/OptionalContent.cc          |   28 
 poppler/Outline.cc                  |   10 
 poppler/OutputDev.cc                |    6 
 poppler/PDFDoc.cc                   |   84 
 poppler/PSOutputDev.cc              |  162 
 poppler/PSOutputDev.h               |    2 
 poppler/Page.cc                     |   10 
 poppler/PageLabelInfo.cc            |    2 
 poppler/Parser.cc                   |   10 
 poppler/PopplerCache.cc             |    4 
 poppler/Rendition.cc                |    4 
 poppler/SecurityHandler.cc          |   26 
 poppler/SignatureHandler.cc         |   60 
 poppler/Sound.cc                    |   10 
 poppler/SplashOutputDev.cc          |  186 
 poppler/StdinCachedFile.cc          |    2 
 poppler/StdinPDFDocBuilder.cc       |    2 
 poppler/Stream.cc                   |   70 
 poppler/StructElement.cc            |   72 
 poppler/StructElement.h             |   30 
 poppler/StructTreeRoot.cc           |    4 
 poppler/StructTreeRoot.h            |    2 
 poppler/TextOutputDev.cc            |  224 
 poppler/UTF.cc                      |    6 
 poppler/UnicodeMap.cc               |   18 
 poppler/UnicodeTypeTable.cc         |  938 ++--
 poppler/XRef.cc                     |   38 
 qt5/demos/abstractinfodock.h        |    2 
 qt5/demos/documentobserver.cpp      |    2 
 qt5/demos/embeddedfiles.h           |    2 
 qt5/demos/fonts.h                   |    2 
 qt5/demos/info.h                    |    2 
 qt5/demos/metadata.h                |    2 
 qt5/demos/navigationtoolbar.h       |    2 
 qt5/demos/optcontent.cpp            |    2 
 qt5/demos/optcontent.h              |    2 
 qt5/demos/pageview.h                |    2 
 qt5/demos/permissions.h             |    2 
 qt5/demos/thumbnails.h              |    2 
 qt5/demos/toc.cpp                   |    4 
 qt5/demos/toc.h                     |    2 
 qt5/demos/viewer.cpp                |    4 
 qt5/src/ArthurOutputDev.cc          |    2 
 qt5/src/poppler-annotation.cc       |   60 
 qt5/src/poppler-base-converter.cc   |    8 
 qt5/src/poppler-document.cc         |   18 
 qt5/src/poppler-embeddedfile.cc     |   14 
 qt5/src/poppler-form.cc             |    6 
 qt5/src/poppler-link.cc             |    4 
 qt5/src/poppler-media.cc            |    2 
 qt5/src/poppler-movie.cc            |    2 
 qt5/src/poppler-optcontent.cc       |   16 
 qt5/src/poppler-optcontent.h        |    2 
 qt5/src/poppler-page.cc             |   36 
 qt5/src/poppler-pdf-converter.cc    |    2 
 qt5/src/poppler-private.cc          |   16 
 qt5/src/poppler-private.h           |    2 
 qt5/src/poppler-ps-converter.cc     |   10 
 qt5/src/poppler-qt5.h               |    8 
 qt5/src/poppler-sound.cc            |    2 
 qt5/tests/check_lexer.cpp           |    2 
 qt5/tests/check_metadata.cpp        |    8 
 qt5/tests/check_search.cpp          |    2 
 qt5/tests/stress-threads-qt5.cpp    |   12 
 qt5/tests/test-poppler-qt5.cpp      |    2 
 splash/Splash.cc                    |  110 
 splash/SplashBitmap.cc              |   18 
 splash/SplashClip.cc                |   12 
 splash/SplashFTFont.cc              |    8 
 splash/SplashFTFontEngine.cc        |    8 
 splash/SplashFTFontFile.cc          |   12 
 splash/SplashFont.cc                |    8 
 splash/SplashFontEngine.cc          |   22 
 splash/SplashFontFile.cc            |    4 
 splash/SplashPath.cc                |    8 
 splash/SplashScreen.cc              |    4 
 splash/SplashState.cc               |   22 
 splash/SplashXPath.cc               |    8 
 splash/SplashXPathScanner.cc        |    4 
 test/CMakeLists.txt                 |    5 
 test/gtk-test.cc                    |   28 
 test/pdf-fullrewrite.cc             |   14 
 test/pdf-inspector.cc               |   22 
 test/perf-test.cc                   |   66 
 utils/HtmlFonts.cc                  |    8 
 utils/HtmlLinks.cc                  |    6 
 utils/HtmlOutputDev.cc              |   94 
 utils/ImageOutputDev.cc             |   10 
 utils/JSInfo.cc                     |    4 
 utils/Win32Console.cc               |    2 
 utils/parseargs.cc                  |    2 
 utils/pdfdetach.cc                  |    8 
 utils/pdffonts.cc                   |    6 
 utils/pdfimages.cc                  |    8 
 utils/pdfinfo.cc                    |    6 
 utils/pdfseparate.cc                |   14 
 utils/pdfsig.cc                     |   12 
 utils/pdftocairo-win32.cc           |   22 
 utils/pdftocairo.cc                 |   34 
 utils/pdftohtml.cc                  |   36 
 utils/pdftoppm.cc                   |   20 
 utils/pdftops.cc                    |    8 
 utils/pdftotext.cc                  |   10 
 utils/pdfunite.cc                   |   16 
 180 files changed, 7929 insertions(+), 7928 deletions(-)

New commits:
commit e428033c2d7efbbbf89bb2f84c8998521ac7ef8e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jan 8 22:55:00 2018 +0100

    Run clang-tidy with modernize nullptr
    
    Also add two enum values in the qt5 frontend to representate no flags
    Also mark glib/gtk/cairo system includes so that gcc doesn't report the issues in those headers

diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index ccb27904..54895bdc 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -111,6 +111,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   set(_warn "${_warn} -Woverloaded-virtual")
   set(_warn "${_warn} -Wmissing-declarations")
   set(_warn "${_warn} -Wundef")
+  set(_warn "${_warn} -Wzero-as-null-pointer-constant")
   if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
     set(_warn "${_warn} -Wsuggest-override")
   endif()
@@ -119,7 +120,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   set(_warnx "${_warnx} -Wconversion")
   set(_warnx "${_warnx} -Wshadow")
   set(_warnx "${_warnx} -Wuseless-cast")
-  set(_warnx "${_warnx} -Wzero-as-null-pointer-constant")
 
   set(DEFAULT_COMPILE_WARNINGS "${_warn}")
   set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
diff --git a/cpp/poppler-document.cpp b/cpp/poppler-document.cpp
index e63d45af..477a7556 100644
--- a/cpp/poppler-document.cpp
+++ b/cpp/poppler-document.cpp
@@ -47,7 +47,7 @@ initer::initer()
 {
     if (!count) {
         globalParams = new GlobalParams();
-        setErrorCallback(detail::error_function, NULL);
+        setErrorCallback(detail::error_function, nullptr);
     }
     count++;
 }
@@ -58,7 +58,7 @@ initer::~initer()
         --count;
         if (!count) {
             delete globalParams;
-            globalParams = 0;
+            globalParams = nullptr;
         }
     }
 }
@@ -67,8 +67,8 @@ initer::~initer()
 document_private::document_private(GooString *file_path, const std::string &owner_password,
                                    const std::string &user_password)
     : initer()
-    , doc(0)
-    , raw_doc_data(0)
+    , doc(nullptr)
+    , raw_doc_data(nullptr)
     , raw_doc_data_length(0)
     , is_locked(false)
 {
@@ -81,8 +81,8 @@ document_private::document_private(byte_array *file_data,
                                    const std::string &owner_password,
                                    const std::string &user_password)
     : initer()
-    , doc(0)
-    , raw_doc_data(0)
+    , doc(nullptr)
+    , raw_doc_data(nullptr)
     , raw_doc_data_length(0)
     , is_locked(false)
 {
@@ -97,7 +97,7 @@ document_private::document_private(const char *file_data, int file_data_length,
                                    const std::string &owner_password,
                                    const std::string &user_password)
     : initer()
-    , doc(0)
+    , doc(nullptr)
     , raw_doc_data(file_data)
     , raw_doc_data_length(file_data_length)
     , is_locked(false)
@@ -129,7 +129,7 @@ document* document_private::check_document(document_private *doc, byte_array *fi
         }
         delete doc;
     }
-    return 0;
+    return nullptr;
 }
 
 /**
@@ -204,7 +204,7 @@ bool document::is_locked() const
 bool document::unlock(const std::string &owner_password, const std::string &user_password)
 {
     if (d->is_locked) {
-        document_private *newdoc = 0;
+        document_private *newdoc = nullptr;
         if (d->doc_data.size() > 0) {
             newdoc = new document_private(&d->doc_data,
                                           owner_password, user_password);
@@ -360,7 +360,7 @@ bool document::set_info_key(const std::string &key, const ustring &val)
     GooString *goo_val;
 
     if (val.empty()) {
-        goo_val = NULL;
+        goo_val = nullptr;
     } else {
         goo_val = detail::ustring_to_unicode_GooString(val);
     }
@@ -406,7 +406,7 @@ bool document::set_info_date(const std::string &key, time_type val)
     GooString *goo_date;
 
     if (val == time_type(-1)) {
-        goo_date = NULL;
+        goo_date = nullptr;
     } else {
         time_t t = static_cast<time_t> (val);
         goo_date = timeToDateString(&t);
@@ -451,7 +451,7 @@ bool document::set_title(const ustring &title)
     GooString *goo_title;
 
     if (title.empty()) {
-        goo_title = NULL;
+        goo_title = nullptr;
     } else {
         goo_title = detail::ustring_to_unicode_GooString(title);
     }
@@ -495,7 +495,7 @@ bool document::set_author(const ustring &author)
     GooString *goo_author;
 
     if (author.empty()) {
-        goo_author = NULL;
+        goo_author = nullptr;
     } else {
         goo_author = detail::ustring_to_unicode_GooString(author);
     }
@@ -539,7 +539,7 @@ bool document::set_subject(const ustring &subject)
     GooString *goo_subject;
 
     if (subject.empty()) {
-        goo_subject = NULL;
+        goo_subject = nullptr;
     } else {
         goo_subject = detail::ustring_to_unicode_GooString(subject);
     }
@@ -583,7 +583,7 @@ bool document::set_keywords(const ustring &keywords)
     GooString *goo_keywords;
 
     if (keywords.empty()) {
-        goo_keywords = NULL;
+        goo_keywords = nullptr;
     } else {
         goo_keywords = detail::ustring_to_unicode_GooString(keywords);
     }
@@ -627,7 +627,7 @@ bool document::set_creator(const ustring &creator)
     GooString *goo_creator;
 
     if (creator.empty()) {
-        goo_creator = NULL;
+        goo_creator = nullptr;
     } else {
         goo_creator = detail::ustring_to_unicode_GooString(creator);
     }
@@ -671,7 +671,7 @@ bool document::set_producer(const ustring &producer)
     GooString *goo_producer;
 
     if (producer.empty()) {
-        goo_producer = NULL;
+        goo_producer = nullptr;
     } else {
         goo_producer = detail::ustring_to_unicode_GooString(producer);
     }
@@ -715,7 +715,7 @@ bool document::set_creation_date(time_type creation_date)
     GooString *goo_creation_date;
 
     if (creation_date == time_type(-1)) {
-        goo_creation_date = NULL;
+        goo_creation_date = nullptr;
     } else {
         time_t t = static_cast<time_t> (creation_date);
         goo_creation_date = timeToDateString(&t);
@@ -760,7 +760,7 @@ bool document::set_modification_date(time_type mod_date)
     GooString *goo_mod_date;
 
     if (mod_date == time_type(-1)) {
-        goo_mod_date = NULL;
+        goo_mod_date = nullptr;
     } else {
         time_t t = static_cast<time_t> (mod_date);
         goo_mod_date = timeToDateString(&t);
@@ -858,7 +858,7 @@ bool document::get_pdf_id(std::string *permanent_id, std::string *update_id) con
     GooString goo_permanent_id;
     GooString goo_update_id;
 
-    if (!d->doc->getID(permanent_id ? &goo_permanent_id : 0, update_id ? &goo_update_id : 0)) {
+    if (!d->doc->getID(permanent_id ? &goo_permanent_id : nullptr, update_id ? &goo_update_id : nullptr)) {
         return false;
     }
 
@@ -896,7 +896,7 @@ page* document::create_page(const ustring &label) const
     int index = 0;
 
     if (!d->doc->getCatalog()->labelToIndex(goolabel.get(), &index)) {
-        return 0;
+        return nullptr;
     }
     return create_page(index);
 }
@@ -1047,7 +1047,7 @@ document* document::load_from_file(const std::string &file_name,
     document_private *doc = new document_private(
                                 new GooString(file_name.c_str()),
                                 owner_password, user_password);
-    return document_private::check_document(doc, 0);
+    return document_private::check_document(doc, nullptr);
 }
 
 /**
@@ -1065,7 +1065,7 @@ document* document::load_from_data(byte_array *file_data,
                                    const std::string &user_password)
 {
     if (!file_data || file_data->size() < 10) {
-        return 0;
+        return nullptr;
     }
 
     document_private *doc = new document_private(
@@ -1093,11 +1093,11 @@ document* document::load_from_raw_data(const char *file_data,
                                        const std::string &user_password)
 {
     if (!file_data || file_data_length < 10) {
-        return 0;
+        return nullptr;
     }
 
     document_private *doc = new document_private(
                                 file_data, file_data_length,
                                 owner_password, user_password);
-    return document_private::check_document(doc, 0);
+    return document_private::check_document(doc, nullptr);
 }
diff --git a/cpp/poppler-image.cpp b/cpp/poppler-image.cpp
index aab2bb48..9f7d8611 100644
--- a/cpp/poppler-image.cpp
+++ b/cpp/poppler-image.cpp
@@ -52,7 +52,7 @@ struct FileCloser {
     FileCloser(const FileCloser &) = delete;
     FileCloser& operator=(const FileCloser &) = delete;
     inline bool close()
-    { if (f) { const int c = fclose(f); f = 0; return c == 0; } return true; }
+    { if (f) { const int c = fclose(f); f = nullptr; return c == 0; } return true; }
 
     FILE *f;
 };
@@ -91,7 +91,7 @@ using namespace poppler;
 
 image_private::image_private(int iwidth, int iheight, image::format_enum iformat)
     : ref(1)
-    , data(0)
+    , data(nullptr)
     , width(iwidth)
     , height(iheight)
     , bytes_per_row(0)
@@ -111,19 +111,19 @@ image_private::~image_private()
 image_private *image_private::create_data(int width, int height, image::format_enum format)
 {
     if (width <= 0 || height <= 0) {
-        return 0;
+        return nullptr;
     }
 
     int bpr = calc_bytes_per_row(width, format);
     if (bpr <= 0) {
-        return 0;
+        return nullptr;
     }
 
     std::unique_ptr<image_private> d(new image_private(width, height, format));
     d->bytes_num = bpr * height;
     d->data = reinterpret_cast<char *>(std::malloc(d->bytes_num));
     if (!d->data) {
-        return 0;
+        return nullptr;
     }
     d->own_data = true;
     d->bytes_per_row = bpr;
@@ -134,12 +134,12 @@ image_private *image_private::create_data(int width, int height, image::format_e
 image_private *image_private::create_data(char *data, int width, int height, image::format_enum format)
 {
     if (width <= 0 || height <= 0 || !data) {
-        return 0;
+        return nullptr;
     }
 
     int bpr = calc_bytes_per_row(width, format);
     if (bpr <= 0) {
-        return 0;
+        return nullptr;
     }
 
     image_private *d = new image_private(width, height, format);
@@ -175,7 +175,7 @@ image_private *image_private::create_data(char *data, int width, int height, ima
  Construct an invalid image.
  */
 image::image()
-    : d(0)
+    : d(nullptr)
 {
 }
 
@@ -283,7 +283,7 @@ int image::bytes_per_row() const
 char *image::data()
 {
     if (!d) {
-        return 0;
+        return nullptr;
     }
 
     detach();
@@ -299,7 +299,7 @@ char *image::data()
  */
 const char *image::const_data() const
 {
-    return d ? d->data : 0;
+    return d ? d->data : nullptr;
 }
 
 /**
diff --git a/cpp/poppler-page.cpp b/cpp/poppler-page.cpp
index 97a4dbb0..8913c8eb 100644
--- a/cpp/poppler-page.cpp
+++ b/cpp/poppler-page.cpp
@@ -37,7 +37,7 @@ page_private::page_private(document_private *_doc, int _index)
     : doc(_doc)
     , page(doc->doc->getCatalog()->getPage(_index + 1))
     , index(_index)
-    , transition(0)
+    , transition(nullptr)
 {
 }
 
@@ -127,7 +127,7 @@ double page::duration() const
  */
 rectf page::page_rect(page_box_enum box) const
 {
-    PDFRectangle *r = 0;
+    PDFRectangle *r = nullptr;
     switch (box) {
     case media_box:
         r = d->page->getMediaBox();
@@ -211,7 +211,7 @@ bool page::search(const ustring &text, rectf &r, search_direction_enum direction
     double rect_right = r.right();
     double rect_bottom = r.bottom();
 
-    TextOutputDev td(NULL, gTrue, 0, gFalse, gFalse);
+    TextOutputDev td(nullptr, gTrue, 0, gFalse, gFalse);
     d->doc->doc->displayPage(&td, d->index + 1, 72, 72, rotation_value, false, true, false);
     TextPage *text_page = td.takeText();
 
@@ -270,7 +270,7 @@ ustring page::text(const rectf &r, text_layout_enum layout_mode) const
 {
     std::unique_ptr<GooString> s;
     const GBool use_raw_order = (layout_mode == raw_order_layout);
-    TextOutputDev td(0, gFalse, 0, use_raw_order, gFalse);
+    TextOutputDev td(nullptr, gFalse, 0, use_raw_order, gFalse);
     d->doc->doc->displayPage(&td, d->index + 1, 72, 72, 0, false, true, false);
     if (r.is_empty()) {
         PDFRectangle *rect = d->page->getCropBox();
diff --git a/cpp/poppler-private.cpp b/cpp/poppler-private.cpp
index 8cfd6497..d326d1b3 100644
--- a/cpp/poppler-private.cpp
+++ b/cpp/poppler-private.cpp
@@ -37,7 +37,7 @@ static void stderr_debug_function(const std::string &msg, void * /*data*/)
 }
 
 debug_func detail::user_debug_function = stderr_debug_function;
-void *detail::debug_closure = 0;
+void *detail::debug_closure = nullptr;
 
 void detail::error_function(void * /*data*/, ErrorCategory /*category*/, Goffset pos, char *msg)
 {
diff --git a/cpp/poppler-toc.cpp b/cpp/poppler-toc.cpp
index a3149c65..a2f74ccd 100644
--- a/cpp/poppler-toc.cpp
+++ b/cpp/poppler-toc.cpp
@@ -37,12 +37,12 @@ toc_private::~toc_private()
 toc* toc_private::load_from_outline(Outline *outline)
 {
     if (!outline) {
-        return 0;
+        return nullptr;
     }
 
     GooList *items = outline->getItems();
     if (!items || items->getLength() < 1) {
-        return 0;
+        return nullptr;
     }
 
     toc *newtoc = new toc();
diff --git a/cpp/tests/poppler-dump.cpp b/cpp/tests/poppler-dump.cpp
index 706ad390..5bfd80d4 100644
--- a/cpp/tests/poppler-dump.cpp
+++ b/cpp/tests/poppler-dump.cpp
@@ -75,7 +75,7 @@ static const ArgDesc the_args[] = {
       "print usage information" },
     { "--help",                argFlag,  &show_help,           0,
       "print usage information" },
-    { NULL, argFlag, 0, 0, NULL }
+    { nullptr, argFlag, nullptr, 0, nullptr }
 };
 
 static void error(const std::string &msg)
diff --git a/cpp/tests/poppler-render.cpp b/cpp/tests/poppler-render.cpp
index 7cc7ca2d..ce0288f9 100644
--- a/cpp/tests/poppler-render.cpp
+++ b/cpp/tests/poppler-render.cpp
@@ -44,7 +44,7 @@ static const ArgDesc the_args[] = {
       "print usage information" },
     { "--help",                argFlag,  &show_help,           0,
       "print usage information" },
-    { NULL, argFlag, 0, 0, NULL }
+    { nullptr, argFlag, nullptr, 0, nullptr }
 };
 
 static void error(const std::string &msg)
diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc
index c5823118..2fa71d13 100644
--- a/fofi/FoFiBase.cc
+++ b/fofi/FoFiBase.cc
@@ -57,29 +57,29 @@ char *FoFiBase::readFile(char *fileName, int *fileLen) {
 
   if (!(f = fopen(fileName, "rb"))) {
     error(errIO, -1, "Cannot open '{0:s}'", fileName);
-    return NULL;
+    return nullptr;
   }
   if (fseek(f, 0, SEEK_END) != 0) {
     error(errIO, -1, "Cannot seek to end of '{0:s}'", fileName);
     fclose(f);
-    return NULL;
+    return nullptr;
   }
   n = (int)ftell(f);
   if (n < 0) {
     error(errIO, -1, "Cannot determine length of '{0:s}'", fileName);
     fclose(f);
-    return NULL;
+    return nullptr;
   }
   if (fseek(f, 0, SEEK_SET) != 0) {
     error(errIO, -1, "Cannot seek to start of '{0:s}'", fileName);
     fclose(f);
-    return NULL;
+    return nullptr;
   }
   buf = (char *)gmalloc(n);
   if ((int)fread(buf, 1, n, f) != n) {
     gfree(buf);
     fclose(f);
-    return NULL;
+    return nullptr;
   }
   fclose(f);
   *fileLen = n;
diff --git a/fofi/FoFiEncodings.cc b/fofi/FoFiEncodings.cc
index 9fad1eba..96bd4e95 100644
--- a/fofi/FoFiEncodings.cc
+++ b/fofi/FoFiEncodings.cc
@@ -34,38 +34,38 @@
 //------------------------------------------------------------------------
 
 const char * const fofiType1StandardEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclam",
   "quotedbl",
@@ -161,40 +161,40 @@ const char * const fofiType1StandardEncoding[256] = {
   "bar",
   "braceright",
   "asciitilde",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "exclamdown",
   "cent",
   "sterling",
@@ -210,12 +210,12 @@ const char * const fofiType1StandardEncoding[256] = {
   "guilsinglright",
   "fi",
   "fl",
-  NULL,
+  nullptr,
   "endash",
   "dagger",
   "daggerdbl",
   "periodcentered",
-  NULL,
+  nullptr,
   "paragraph",
   "bullet",
   "quotesinglbase",
@@ -224,9 +224,9 @@ const char * const fofiType1StandardEncoding[256] = {
   "guillemotright",
   "ellipsis",
   "perthousand",
-  NULL,
+  nullptr,
   "questiondown",
-  NULL,
+  nullptr,
   "grave",
   "acute",
   "circumflex",
@@ -235,100 +235,100 @@ const char * const fofiType1StandardEncoding[256] = {
   "breve",
   "dotaccent",
   "dieresis",
-  NULL,
+  nullptr,
   "ring",
   "cedilla",
-  NULL,
+  nullptr,
   "hungarumlaut",
   "ogonek",
   "caron",
   "emdash",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "AE",
-  NULL,
+  nullptr,
   "ordfeminine",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Lslash",
   "Oslash",
   "OE",
   "ordmasculine",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "ae",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "dotlessi",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "lslash",
   "oslash",
   "oe",
   "germandbls",
-  NULL,
-  NULL,
-  NULL,
-  NULL
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr
 };
 
 const char * const fofiType1ExpertEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclamsmall",
   "Hungarumlautsmall",
-  NULL,
+  nullptr,
   "dollaroldstyle",
   "dollarsuperior",
   "ampersandsmall",
@@ -357,35 +357,35 @@ const char * const fofiType1ExpertEncoding[256] = {
   "threequartersemdash",
   "periodsuperior",
   "questionsmall",
-  NULL,
+  nullptr,
   "asuperior",
   "bsuperior",
   "centsuperior",
   "dsuperior",
   "esuperior",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "isuperior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "lsuperior",
   "msuperior",
   "nsuperior",
   "osuperior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "rsuperior",
   "ssuperior",
   "tsuperior",
-  NULL,
+  nullptr,
   "ff",
   "fi",
   "fl",
   "ffi",
   "ffl",
   "parenleftinferior",
-  NULL,
+  nullptr,
   "parenrightinferior",
   "Circumflexsmall",
   "hyphensuperior",
@@ -420,67 +420,67 @@ const char * const fofiType1ExpertEncoding[256] = {
   "onefitted",
   "rupiah",
   "Tildesmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "exclamdownsmall",
   "centoldstyle",
   "Lslashsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Scaronsmall",
   "Zcaronsmall",
   "Dieresissmall",
   "Brevesmall",
   "Caronsmall",
-  NULL,
+  nullptr,
   "Dotaccentsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Macronsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "figuredash",
   "hypheninferior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Ogoneksmall",
   "Ringsmall",
   "Cedillasmall",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "onequarter",
   "onehalf",
   "threequarters",
@@ -491,8 +491,8 @@ const char * const fofiType1ExpertEncoding[256] = {
   "seveneighths",
   "onethird",
   "twothirds",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "zerosuperior",
   "onesuperior",
   "twosuperior",
diff --git a/fofi/FoFiIdentifier.cc b/fofi/FoFiIdentifier.cc
index 1e657ef2..3d41145b 100644
--- a/fofi/FoFiIdentifier.cc
+++ b/fofi/FoFiIdentifier.cc
@@ -190,7 +190,7 @@ FileReader *FileReader::make(char *fileName) {
   FILE *fA;
 
   if (!(fA = fopen(fileName, "rb"))) {
-    return NULL;
+    return nullptr;
   }
   return new FileReader(fA);
 }
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
index c663249d..76299acc 100644
--- a/fofi/FoFiTrueType.cc
+++ b/fofi/FoFiTrueType.cc
@@ -277,7 +277,7 @@ FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA, int faceIndexA) {
   ff = new FoFiTrueType(fileA, lenA, gFalse, faceIndexA);
   if (!ff->parsedOk) {
     delete ff;
-    return NULL;
+    return nullptr;
   }
   return ff;
 }
@@ -288,12 +288,12 @@ FoFiTrueType *FoFiTrueType::load(char *fileName, int faceIndexA) {
   int lenA;
 
   if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
-    return NULL;
+    return nullptr;
   }
   ff = new FoFiTrueType(fileA, lenA, gTrue, faceIndexA);
   if (!ff->parsedOk) {
     delete ff;
-    return NULL;
+    return nullptr;
   }
   return ff;
 }
@@ -301,11 +301,11 @@ FoFiTrueType *FoFiTrueType::load(char *fileName, int faceIndexA) {
 FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA):
   FoFiBase(fileA, lenA, freeFileDataA)
 {
-  tables = NULL;
+  tables = nullptr;
   nTables = 0;
-  cmaps = NULL;
+  cmaps = nullptr;
   nCmaps = 0;
-  nameToGID = NULL;
+  nameToGID = nullptr;
   parsedOk = gFalse;
   faceIndex = faceIndexA;
   gsubFeatureTable = 0;
@@ -472,10 +472,10 @@ int *FoFiTrueType::getCIDToGIDMap(int *nCIDs) {
 
   *nCIDs = 0;
   if (!getCFFBlock(&start, &length)) {
-    return NULL;
+    return nullptr;
   }
   if (!(ff = FoFiType1C::make(start, length))) {
-    return NULL;
+    return nullptr;
   }
   map = ff->getCIDToGIDMap(nCIDs);
   delete ff;
@@ -556,7 +556,7 @@ void FoFiTrueType::convertToType42(char *psName, char **encoding,
   // write the guts of the dictionary
   cvtEncoding(encoding, outputFunc, outputStream);
   cvtCharStrings(encoding, codeToGID, outputFunc, outputStream);
-  cvtSfnts(outputFunc, outputStream, NULL, gFalse, &maxUsedGlyph);
+  cvtSfnts(outputFunc, outputStream, nullptr, gFalse, &maxUsedGlyph);
 
   // end the dictionary and define the font
   (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
@@ -701,7 +701,7 @@ void FoFiTrueType::convertToCIDType2(char *psName,
   (*outputFunc)(outputStream, "  end readonly def\n", 19);
 
   // write the guts of the dictionary
-  cvtSfnts(outputFunc, outputStream, NULL, needVerticalMetrics, &maxUsedGlyph);
+  cvtSfnts(outputFunc, outputStream, nullptr, needVerticalMetrics, &maxUsedGlyph);
 
   // end the dictionary and define the font
   (*outputFunc)(outputStream,
@@ -1061,7 +1061,7 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc,
       ++nNewTables;
     }
   }
-  vmtxTab = NULL; // make gcc happy
+  vmtxTab = nullptr; // make gcc happy
   vmtxTabLength = 0;
   advance = 0; // make gcc happy
   if (needVerticalMetrics) {
@@ -1387,7 +1387,7 @@ void FoFiTrueType::parse() {
     nTables = j;
     tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable));
   }
-  if (!parsedOk || tables == NULL) {
+  if (!parsedOk || tables == nullptr) {
     return;
   }
 
@@ -1526,7 +1526,7 @@ void FoFiTrueType::readPostTable() {
  err:
   if (nameToGID) {
     delete nameToGID;
-    nameToGID = NULL;
+    nameToGID = nullptr;
   }
 }
 
@@ -1570,7 +1570,7 @@ Guint FoFiTrueType::charToTag(const char *tagName)
 */
 int FoFiTrueType::setupGSUB(const char *scriptName)
 {
-  return setupGSUB(scriptName, NULL);
+  return setupGSUB(scriptName, nullptr);
 }
 
 /*
@@ -1595,7 +1595,7 @@ int FoFiTrueType::setupGSUB(const char *scriptName,
   int x;
   Guint pos;
 
-  if (scriptName == 0) {
+  if (scriptName == nullptr) {
     gsubFeatureTable = 0;
     return 0;
   }
diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc
index a73b77c2..dbe95b67 100644
--- a/fofi/FoFiType1.cc
+++ b/fofi/FoFiType1.cc
@@ -54,7 +54,7 @@ FoFiType1 *FoFiType1::load(char *fileName) {
   int lenA;
 
   if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
-    return NULL;
+    return nullptr;
   }
   return new FoFiType1(fileA, lenA, gTrue);
 }
@@ -62,8 +62,8 @@ FoFiType1 *FoFiType1::load(char *fileName) {
 FoFiType1::FoFiType1(char *fileA, int lenA, GBool freeFileDataA):
   FoFiBase(fileA, lenA, freeFileDataA)
 {
-  name = NULL;
-  encoding = NULL;
+  name = nullptr;
+  encoding = nullptr;
   fontMatrix[0] = 0.001;
   fontMatrix[1] = 0;
   fontMatrix[2] = 0;
@@ -150,7 +150,7 @@ void FoFiType1::writeEncoded(const char **newEncoding,
     // skip "/Encoding" + one whitespace char,
     // then look for 'def' preceded by PostScript whitespace
     p = line + 10;
-    line = NULL;
+    line = nullptr;
     for (; p < (char *)file + len; ++p) {
       if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
 	   *p == '\x0d' || *p == '\x0c' || *p == '\0') &&
@@ -176,7 +176,7 @@ void FoFiType1::writeEncoded(const char **newEncoding,
 	// skip "/Encoding" + one whitespace char,
 	// then look for 'def' preceded by PostScript whitespace
 	p = line2 + 10;
-	line = NULL;
+	line = nullptr;
 	for (; p < (char *)file + len; ++p) {
 	  if ((*p == ' ' || *p == '\t' || *p == '\x0a' ||
 	       *p == '\x0d' || *p == '\x0c' || *p == '\0') &&
@@ -207,7 +207,7 @@ char *FoFiType1::getNextLine(char *line) {
     ++line;
   }
   if (line >= (char *)file + len) {
-    return NULL;
+    return nullptr;
   }
   return line;
 }
@@ -243,7 +243,7 @@ void FoFiType1::parse() {
 	       !strncmp(line, "/Encoding 256 array", 19)) {
       encoding = (char **)gmallocn(256, sizeof(char *));
       for (j = 0; j < 256; ++j) {
-	encoding[j] = NULL;
+	encoding[j] = nullptr;
       }
       continueLine = gFalse;
       for (j = 0, line = getNextLine(line);
@@ -324,7 +324,7 @@ void FoFiType1::parse() {
 	  }
 	} else {
 	  if (strtok_r(buf, " \t", &tokptr) &&
-	      (p = strtok_r(NULL, " \t\n\r", &tokptr)) && !strcmp(p, "def")) {
+	      (p = strtok_r(nullptr, " \t\n\r", &tokptr)) && !strcmp(p, "def")) {
 	    break;
 	  }
 	}
@@ -339,7 +339,7 @@ void FoFiType1::parse() {
 	if ((p2 = strchr(p, ']'))) {
 	  *p2 = '\0';
 	  for (j = 0; j < 6; ++j) {
-	    if ((p = strtok(j == 0 ? p : (char *)NULL, " \t\n\r"))) {
+	    if ((p = strtok(j == 0 ? p : (char *)nullptr, " \t\n\r"))) {
 	      fontMatrix[j] = atof(p);
 	    } else {
 	      break;
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 7c9494f5..03e77993 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -51,7 +51,7 @@ FoFiType1C *FoFiType1C::make(char *fileA, int lenA) {
   ff = new FoFiType1C(fileA, lenA, gFalse);
   if (!ff->parse()) {
     delete ff;
-    return NULL;
+    return nullptr;
   }
   return ff;
 }
@@ -62,12 +62,12 @@ FoFiType1C *FoFiType1C::load(char *fileName) {
   int lenA;
 
   if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
-    return NULL;
+    return nullptr;
   }
   ff = new FoFiType1C(fileA, lenA, gTrue);
   if (!ff->parse()) {
     delete ff;
-    return NULL;
+    return nullptr;
   }
   return ff;
 }
@@ -75,11 +75,11 @@ FoFiType1C *FoFiType1C::load(char *fileName) {
 FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA):
   FoFiBase(fileA, lenA, freeFileDataA)
 {
-  name = NULL;
-  encoding = NULL;
-  privateDicts = NULL;
-  fdSelect = NULL;
-  charset = NULL;
+  name = nullptr;
+  encoding = nullptr;
+  privateDicts = nullptr;
+  fdSelect = nullptr;
+  charset = nullptr;
   charsetLength = 0;
 }
 
@@ -112,7 +112,7 @@ FoFiType1C::~FoFiType1C() {
 }
 
 char *FoFiType1C::getName() {
-  return name ? name->getCString() : (char *)NULL;
+  return name ? name->getCString() : (char *)nullptr;
 }
 
 char **FoFiType1C::getEncoding() {
@@ -125,10 +125,10 @@ GooString *FoFiType1C::getGlyphName(int gid) {
 
   ok = gTrue;
   if (gid < 0 || gid >= charsetLength)
-    return NULL;
+    return nullptr;
   getString(charset[gid], buf, &ok);
   if (!ok) {
-    return NULL;
+    return nullptr;
   }
   return new GooString(buf);
 }
@@ -140,7 +140,7 @@ int *FoFiType1C::getCIDToGIDMap(int *nCIDs) {
   // a CID font's top dict has ROS as the first operator
   if (topDict.firstOp != 0x0c1e) {
     *nCIDs = 0;
-    return NULL;
+    return nullptr;
   }
 
   // in a CID font, the charset data is the GID-to-CID mapping, so all
@@ -2412,7 +2412,7 @@ void FoFiType1C::buildEncoding() {
   } else {
     encoding = (char **)gmallocn(256, sizeof(char *));
     for (i = 0; i < 256; ++i) {
-      encoding[i] = NULL;
+      encoding[i] = nullptr;
     }
     pos = topDict.encodingOffset;
     encFormat = getU8(pos++, &parsedOk);
@@ -2545,7 +2545,7 @@ GBool FoFiType1C::readCharset() {
     }
     if (!parsedOk) {
       gfree(charset);
-      charset = NULL;
+      charset = nullptr;
       charsetLength = 0;
       return gFalse;
     }
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index e089ef8e..9a09d7ab 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -1,6 +1,10 @@
 include_directories(
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+include_directories(
+  SYSTEM
   ${GLIB2_INCLUDE_DIRS}
   ${CAIRO_INCLUDE_DIRS}
 )
diff --git a/glib/demo/info.cc b/glib/demo/info.cc
index a396ba1d..689bdb60 100644
--- a/glib/demo/info.cc
+++ b/glib/demo/info.cc
@@ -30,7 +30,7 @@ pgd_info_add_permissions (GtkGrid            *table,
 	GtkWidget *label, *hbox, *vbox;
 	GtkWidget *checkbox;
 
-	label = gtk_label_new (NULL);
+	label = gtk_label_new (nullptr);
 	g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
 	gtk_label_set_markup (GTK_LABEL (label), "<b>Permissions:</b>");
 	gtk_grid_attach (GTK_GRID (table), label, 0, *row, 1, 1);
@@ -110,13 +110,13 @@ pgd_info_add_metadata (GtkGrid     *table,
 	GtkWidget     *textview, *swindow;
 	GtkTextBuffer *buffer;
 
-	label = gtk_label_new (NULL);
+	label = gtk_label_new (nullptr);
 	g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
 	gtk_label_set_markup (GTK_LABEL (label), "<b>Metadata:</b>");
 	gtk_grid_attach (GTK_GRID (table), label, 0, *row, 1, 1);
 	gtk_widget_show (label);
 
-	swindow = gtk_scrolled_window_new (NULL, NULL);
+	swindow = gtk_scrolled_window_new (nullptr, nullptr);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
 					GTK_POLICY_AUTOMATIC,
 					GTK_POLICY_AUTOMATIC);
@@ -184,15 +184,15 @@ pgd_info_create_widget (PopplerDocument *document)
 	enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (POPPLER_TYPE_BACKEND), backend);
 	str = g_strdup_printf ("<span weight='bold' size='larger'>Poppler %s (%s)</span>",
 			       poppler_get_version (), enum_value->value_name);
-	label = gtk_label_new (NULL);
+	label = gtk_label_new (nullptr);
 	gtk_label_set_markup (GTK_LABEL (label), str);
 	g_free (str);
 	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 12);
 	gtk_widget_show (label);
 
-	frame = gtk_frame_new (NULL);
+	frame = gtk_frame_new (nullptr);
 	gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-	label = gtk_label_new (NULL);
+	label = gtk_label_new (nullptr);
 	gtk_label_set_markup (GTK_LABEL (label), "<b>Document properties</b>");
 	gtk_frame_set_label_widget (GTK_FRAME (frame), label);
 	gtk_widget_show (label);
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index 72969a5e..b9e05244 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -74,9 +74,9 @@ poppler_action_layer_free (PopplerActionLayer *action_layer)
 		return;
 
 	if (action_layer->layers) {
-		g_list_foreach (action_layer->layers, (GFunc)g_object_unref, NULL);
+		g_list_foreach (action_layer->layers, (GFunc)g_object_unref, nullptr);
 		g_list_free (action_layer->layers);
-		action_layer->layers = NULL;
+		action_layer->layers = nullptr;
 	}
 
 	g_slice_free (PopplerActionLayer, action_layer);
@@ -88,7 +88,7 @@ poppler_action_layer_copy (PopplerActionLayer *action_layer)
 	PopplerActionLayer *retval = g_slice_dup (PopplerActionLayer, action_layer);
 
 	retval->layers = g_list_copy (action_layer->layers);
-	g_list_foreach (action_layer->layers, (GFunc)g_object_ref, NULL);
+	g_list_foreach (action_layer->layers, (GFunc)g_object_ref, nullptr);
 
 	return retval;
 }
@@ -104,7 +104,7 @@ POPPLER_DEFINE_BOXED_TYPE (PopplerAction, poppler_action, poppler_action_copy, p
 void
 poppler_action_free (PopplerAction *action)
 {
-	if (action == NULL)
+	if (action == nullptr)
 		return;
 
 	/* Action specific stuff */
@@ -136,7 +136,7 @@ poppler_action_free (PopplerAction *action)
 		break;
 	case POPPLER_ACTION_OCG_STATE:
 		if (action->ocg_state.state_list) {
-			g_list_foreach (action->ocg_state.state_list, (GFunc)poppler_action_layer_free, NULL);
+			g_list_foreach (action->ocg_state.state_list, (GFunc)poppler_action_layer_free, nullptr);
 			g_list_free (action->ocg_state.state_list);
 		}
 		break;
@@ -165,12 +165,12 @@ poppler_action_copy (PopplerAction *action)
 {
 	PopplerAction *new_action;
 
-	g_return_val_if_fail (action != NULL, NULL);
+	g_return_val_if_fail (action != nullptr, NULL);
 
 	/* Do a straight copy of the memory */
 	new_action = g_slice_dup (PopplerAction, action);
 
-	if (action->any.title != NULL)
+	if (action->any.title != nullptr)
 		new_action->any.title = g_strdup (action->any.title);
 
 	switch (action->type) {
@@ -207,7 +207,7 @@ poppler_action_copy (PopplerAction *action)
 	case POPPLER_ACTION_OCG_STATE:
 		if (action->ocg_state.state_list) {
 			GList *l;
-			GList *new_list = NULL;
+			GList *new_list = nullptr;
 
 			for (l = action->ocg_state.state_list; l; l = g_list_next (l)) {
 				PopplerActionLayer *alayer = (PopplerActionLayer *)l->data;
@@ -238,7 +238,7 @@ dest_new_goto (PopplerDocument *document,
 
 	dest = g_slice_new0 (PopplerDest);
 
-	if (link_dest == NULL) {
+	if (link_dest == nullptr) {
 		dest->type = POPPLER_DEST_UNKNOWN;
 		return dest;
 	}
@@ -323,7 +323,7 @@ dest_new_named (GooString *named_dest)
 
 	dest = g_slice_new0 (PopplerDest);
 
-	if (named_dest == NULL) {
+	if (named_dest == nullptr) {
 		dest->type = POPPLER_DEST_UNKNOWN;
 		return dest;
 	}
@@ -344,19 +344,19 @@ build_goto_dest (PopplerDocument *document,
 
 	/* Return if it isn't OK */
 	if (! link->isOk ()) {
-		action->goto_dest.dest = dest_new_goto (NULL, NULL);
+		action->goto_dest.dest = dest_new_goto (nullptr, nullptr);
 		return;
 	}
 	
 	link_dest = link->getDest ();
 	named_dest = link->getNamedDest ();
 
-	if (link_dest != NULL) {
+	if (link_dest != nullptr) {
 		action->goto_dest.dest = dest_new_goto (document, link_dest);
-	} else if (named_dest != NULL) {
+	} else if (named_dest != nullptr) {
 		action->goto_dest.dest = dest_new_named (named_dest);
 	} else {
-		action->goto_dest.dest = dest_new_goto (document, NULL);
+		action->goto_dest.dest = dest_new_goto (document, nullptr);
 	}
 }
 
@@ -369,7 +369,7 @@ build_goto_remote (PopplerAction *action,
 	
 	/* Return if it isn't OK */
 	if (! link->isOk ()) {
-		action->goto_remote.dest = dest_new_goto (NULL, NULL);
+		action->goto_remote.dest = dest_new_goto (nullptr, nullptr);
 		return;
 	}
 
@@ -378,12 +378,12 @@ build_goto_remote (PopplerAction *action,
 	link_dest = link->getDest ();
 	named_dest = link->getNamedDest ();
 	
-	if (link_dest != NULL) {
-		action->goto_remote.dest = dest_new_goto (NULL, link_dest);
-	} else if (named_dest != NULL) {
+	if (link_dest != nullptr) {
+		action->goto_remote.dest = dest_new_goto (nullptr, link_dest);
+	} else if (named_dest != nullptr) {
 		action->goto_remote.dest = dest_new_named (named_dest);
 	} else {
-		action->goto_remote.dest = dest_new_goto (NULL, NULL);
+		action->goto_remote.dest = dest_new_goto (nullptr, nullptr);
 	}
 }
 
@@ -406,7 +406,7 @@ build_uri (PopplerAction *action,
 	gchar *uri;
 
 	uri = link->getURI()->getCString ();
-	if (uri != NULL)
+	if (uri != nullptr)
 		action->uri.uri = g_strdup (uri);
 }
 
@@ -417,7 +417,7 @@ build_named (PopplerAction *action,
 	gchar *name;
 
 	name = link->getName ()->getCString ();
-	if (name != NULL)
+	if (name != nullptr)
 		action->named.named_dest = g_strdup (name);
 }
 
@@ -425,7 +425,7 @@ static AnnotMovie *
 find_annot_movie_for_action (PopplerDocument *document,
 			     LinkMovie       *link)
 {
-  AnnotMovie *annot = NULL;
+  AnnotMovie *annot = nullptr;
   XRef *xref = document->doc->getXRef ();
   Object annotObj;
 
@@ -480,7 +480,7 @@ find_annot_movie_for_action (PopplerDocument *document,
     annot = new AnnotMovie (document->doc, &annotObj, &tmp);
     if (!annot->isOk ()) {
       delete annot;
-      annot = NULL;
+      annot = nullptr;
     }
   }
 
@@ -554,7 +554,7 @@ get_layer_for_ref (PopplerDocument *document,
 			Ref ocgRef = layer->oc->getRef();
 
 			if (ref->num == ocgRef.num && ref->gen == ocgRef.gen) {
-				GList *rb_group = NULL;
+				GList *rb_group = nullptr;
 
 				if (preserve_rb)
 					rb_group = _poppler_document_get_layer_rbgroup (document, layer);
@@ -569,7 +569,7 @@ get_layer_for_ref (PopplerDocument *document,
 		}
 	}
 
-	return NULL;
+	return nullptr;
 }
 
 static void
@@ -580,7 +580,7 @@ build_ocg_state (PopplerDocument *document,
 	GooList *st_list = ocg_state->getStateList();
 	GBool    preserve_rb = ocg_state->getPreserveRB();
 	gint     i, j;
-	GList   *layer_state = NULL;
+	GList   *layer_state = nullptr;
 
 	if (!document->layers) {
 		if (!_poppler_document_get_layers (document))
@@ -628,7 +628,7 @@ _poppler_action_new (PopplerDocument *document,
 	if (title)
 		action->any.title = g_strdup (title);
 
-	if (link == NULL) {
+	if (link == nullptr) {
 		action->type = POPPLER_ACTION_NONE;
 		return action;
 	}
diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc
index 312aa317..929135aa 100644
--- a/glib/poppler-annot.cc
+++ b/glib/poppler-annot.cc
@@ -167,7 +167,7 @@ _poppler_create_annot (GType annot_type, Annot *annot)
 {
   PopplerAnnot *poppler_annot;
 
-  poppler_annot = POPPLER_ANNOT (g_object_new (annot_type, NULL));
+  poppler_annot = POPPLER_ANNOT (g_object_new (annot_type, nullptr));
   poppler_annot->annot = annot;
   annot->incRefCnt();
 
@@ -181,7 +181,7 @@ poppler_annot_finalize (GObject *object)
 
   if (poppler_annot->annot) {
     poppler_annot->annot->decRefCnt();
-    poppler_annot->annot = NULL;
+    poppler_annot->annot = nullptr;
   }
 
   G_OBJECT_CLASS (poppler_annot_parent_class)->finalize (object);
@@ -382,7 +382,7 @@ poppler_annot_text_markup_new_squiggly (PopplerDocument  *doc,
   PDFRectangle pdf_rect(rect->x1, rect->y1,
 			rect->x2, rect->y2);
 
-  g_return_val_if_fail (quadrilaterals != NULL && quadrilaterals->len > 0, NULL);
+  g_return_val_if_fail (quadrilaterals != nullptr && quadrilaterals->len > 0, NULL);
 
   annot = new AnnotTextMarkup (doc->doc, &pdf_rect, Annot::typeSquiggly);
 
@@ -416,7 +416,7 @@ poppler_annot_text_markup_new_strikeout (PopplerDocument  *doc,
   PDFRectangle pdf_rect(rect->x1, rect->y1,
 			rect->x2, rect->y2);
 
-  g_return_val_if_fail (quadrilaterals != NULL && quadrilaterals->len > 0, NULL);
+  g_return_val_if_fail (quadrilaterals != nullptr && quadrilaterals->len > 0, NULL);
 
   annot = new AnnotTextMarkup (doc->doc, &pdf_rect, Annot::typeStrikeOut);
 
@@ -450,7 +450,7 @@ poppler_annot_text_markup_new_underline (PopplerDocument  *doc,
   PDFRectangle pdf_rect(rect->x1, rect->y1,
 			rect->x2, rect->y2);
 
-  g_return_val_if_fail (quadrilaterals != NULL && quadrilaterals->len > 0, NULL);
+  g_return_val_if_fail (quadrilaterals != nullptr && quadrilaterals->len > 0, NULL);
 
   annot = new AnnotTextMarkup (doc->doc, &pdf_rect, Annot::typeUnderline);
 
@@ -500,7 +500,7 @@ poppler_annot_movie_finalize (GObject *object)
 
   if (annot_movie->movie) {
     g_object_unref (annot_movie->movie);
-    annot_movie->movie = NULL;
+    annot_movie->movie = nullptr;
   }
 
   G_OBJECT_CLASS (poppler_annot_movie_parent_class)->finalize (object);
@@ -539,7 +539,7 @@ poppler_annot_screen_finalize (GObject *object)
 
   if (annot_screen->action) {
     poppler_action_free (annot_screen->action);
-    annot_screen->action = NULL;
+    annot_screen->action = nullptr;
   }
 
   G_OBJECT_CLASS (poppler_annot_screen_parent_class)->finalize (object);
@@ -569,7 +569,7 @@ _poppler_annot_screen_new (PopplerDocument *doc, Annot *annot)
   annot_screen = static_cast<AnnotScreen *>(poppler_annot->annot);
   action = annot_screen->getAction();
   if (action)
-    POPPLER_ANNOT_SCREEN (poppler_annot)->action = _poppler_action_new (doc, action, NULL);
+    POPPLER_ANNOT_SCREEN (poppler_annot)->action = _poppler_action_new (doc, action, nullptr);
 
   return poppler_annot;
 }
@@ -799,7 +799,7 @@ poppler_annot_get_contents (PopplerAnnot *poppler_annot)
 
   contents = poppler_annot->annot->getContents ();
 
-  return contents && contents->getLength() > 0 ? _poppler_goo_string_to_utf8 (contents) : NULL;
+  return contents && contents->getLength() > 0 ? _poppler_goo_string_to_utf8 (contents) : nullptr;
 }
 
 /**
@@ -822,7 +822,7 @@ poppler_annot_set_contents (PopplerAnnot *poppler_annot,
   
   g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
 
-  tmp = contents ? g_convert (contents, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+  tmp = contents ? g_convert (contents, -1, "UTF-16BE", "UTF-8", nullptr, &length, nullptr) : nullptr;
   goo_tmp = new GooString (tmp, length);
   g_free (tmp);
   poppler_annot->annot->setContents (goo_tmp);
@@ -847,7 +847,7 @@ poppler_annot_get_name (PopplerAnnot *poppler_annot)
 
   name = poppler_annot->annot->getName ();
 
-  return name ? _poppler_goo_string_to_utf8 (name) : NULL;
+  return name ? _poppler_goo_string_to_utf8 (name) : nullptr;
 }
 
 /**
@@ -870,7 +870,7 @@ poppler_annot_get_modified (PopplerAnnot *poppler_annot)
 
   text = poppler_annot->annot->getModified ();
 
-  return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+  return text ? _poppler_goo_string_to_utf8 (text) : nullptr;
 }
 
 /**
@@ -914,7 +914,7 @@ poppler_annot_set_flags (PopplerAnnot *poppler_annot, PopplerAnnotFlag flags)
 static PopplerColor *
 create_poppler_color_from_annot_color (AnnotColor *color)
 {
-  PopplerColor *poppler_color = NULL;
+  PopplerColor *poppler_color = nullptr;
 
   if (color) {
     const double *values = color->getValues ();
@@ -951,7 +951,7 @@ static AnnotColor *
 create_annot_color_from_poppler_color (PopplerColor *poppler_color)
 {
   if (!poppler_color)
-    return NULL;
+    return nullptr;
 
   return new AnnotColor ((double)poppler_color->red / 65535,
                          (double)poppler_color->green / 65535,
@@ -1030,7 +1030,7 @@ poppler_annot_get_rectangle (PopplerAnnot     *poppler_annot,
   PDFRectangle *annot_rect;
 
   g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
-  g_return_if_fail (poppler_rect != NULL);
+  g_return_if_fail (poppler_rect != nullptr);
 
   annot_rect = poppler_annot->annot->getRect ();
   poppler_rect->x1 = annot_rect->x1;
@@ -1054,7 +1054,7 @@ poppler_annot_set_rectangle (PopplerAnnot     *poppler_annot,
                              PopplerRectangle *poppler_rect)
 {
   g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot));
-  g_return_if_fail (poppler_rect != NULL);
+  g_return_if_fail (poppler_rect != nullptr);
 
   poppler_annot->annot->setRect (poppler_rect->x1, poppler_rect->y1,
                                  poppler_rect->x2, poppler_rect->y2);
@@ -1081,7 +1081,7 @@ poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot)
 
   text = annot->getLabel ();
 
-  return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+  return text ? _poppler_goo_string_to_utf8 (text) : nullptr;
 }
 
 /**
@@ -1106,7 +1106,7 @@ poppler_annot_markup_set_label (PopplerAnnotMarkup *poppler_annot,
 
   annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
 
-  tmp = label ? g_convert (label, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+  tmp = label ? g_convert (label, -1, "UTF-16BE", "UTF-8", nullptr, &length, nullptr) : nullptr;
   goo_tmp = new GooString (tmp, length);
   g_free (tmp);
   annot->setLabel (goo_tmp);
@@ -1132,7 +1132,7 @@ poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot)
 
   annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
 
-  return annot->getPopup () != NULL;
+  return annot->getPopup () != nullptr;
 }
 
 /**
@@ -1234,7 +1234,7 @@ poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
   PDFRectangle *annot_rect;
 
   g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), FALSE);
-  g_return_val_if_fail (poppler_rect != NULL, FALSE);
+  g_return_val_if_fail (poppler_rect != nullptr, FALSE);
 
   annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
   annot_popup = annot->getPopup ();
@@ -1270,7 +1270,7 @@ poppler_annot_markup_set_popup_rectangle (PopplerAnnotMarkup *poppler_annot,
         Annot *annot_popup;
 
         g_return_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot));
-        g_return_if_fail (poppler_rect != NULL);
+        g_return_if_fail (poppler_rect != nullptr);
 
         annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
         annot_popup = annot->getPopup ();
@@ -1346,7 +1346,7 @@ poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot)
   annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
   annot_date = annot->getDate ();
   if (!annot_date)
-    return NULL;
+    return nullptr;
 
   if (_poppler_convert_pdf_date_to_gtime (annot_date, &timet)) {
     GDate *date;
@@ -1357,7 +1357,7 @@ poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot)
     return date;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /**
@@ -1380,7 +1380,7 @@ poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot)
 
   text = annot->getSubject ();
 
-  return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+  return text ? _poppler_goo_string_to_utf8 (text) : nullptr;
 }
 
 /**
@@ -1506,7 +1506,7 @@ poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot)
 
   text = annot->getIcon ();
 
-  return text ? _poppler_goo_string_to_utf8 (text) : NULL;
+  return text ? _poppler_goo_string_to_utf8 (text) : nullptr;
 }
 
 /**
@@ -1624,7 +1624,7 @@ poppler_annot_text_markup_set_quadrilaterals (PopplerAnnotTextMarkup *poppler_an
   AnnotTextMarkup *annot;
 
   g_return_if_fail (POPPLER_IS_ANNOT_TEXT_MARKUP (poppler_annot));
-  g_return_if_fail (quadrilaterals != NULL && quadrilaterals->len > 0);
+  g_return_if_fail (quadrilaterals != nullptr && quadrilaterals->len > 0);
 
   annot = static_cast<AnnotTextMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
   AnnotQuadrilaterals *quads = create_annot_quads_from_poppler_quads (quadrilaterals);
@@ -1730,7 +1730,7 @@ poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot)
     return callout;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 /* PopplerAnnotFileAttachment */
@@ -1783,7 +1783,7 @@ poppler_annot_file_attachment_get_name (PopplerAnnotFileAttachment *poppler_anno
   annot = static_cast<AnnotFileAttachment *>(POPPLER_ANNOT (poppler_annot)->annot);
   name = annot->getName ();
 
-  return name ? _poppler_goo_string_to_utf8 (name) : NULL;
+  return name ? _poppler_goo_string_to_utf8 (name) : nullptr;
 }
 
 /* PopplerAnnotCalloutLine */
@@ -1819,7 +1819,7 @@ poppler_annot_callout_line_copy (PopplerAnnotCalloutLine *callout)
 {
   PopplerAnnotCalloutLine *new_callout;
 
-  g_return_val_if_fail (callout != NULL, NULL);
+  g_return_val_if_fail (callout != nullptr, NULL);
   
   new_callout = g_new0 (PopplerAnnotCalloutLine, 1);
   *new_callout = *callout;
@@ -1863,7 +1863,7 @@ poppler_annot_movie_get_title (PopplerAnnotMovie *poppler_annot)
 
   title = annot->getTitle ();
 
-  return title ? _poppler_goo_string_to_utf8 (title) : NULL;
+  return title ? _poppler_goo_string_to_utf8 (title) : nullptr;
 }
 
 /**
@@ -1920,8 +1920,8 @@ poppler_annot_line_set_vertices (PopplerAnnotLine *poppler_annot,
   AnnotLine *annot;
 
   g_return_if_fail (POPPLER_IS_ANNOT_LINE (poppler_annot));
-  g_return_if_fail (start != NULL);
-  g_return_if_fail (end != NULL);
+  g_return_if_fail (start != nullptr);
+  g_return_if_fail (end != nullptr);
 
   annot = static_cast<AnnotLine *>(POPPLER_ANNOT (poppler_annot)->annot);
   annot->setVertices (start->x, start->y, end->x, end->y);
diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc
index 5d84595a..c6502e9d 100644
--- a/glib/poppler-attachment.cc
+++ b/glib/poppler-attachment.cc
@@ -78,15 +78,15 @@ poppler_attachment_finalize (GObject *obj)
 
   if (attachment->name)
     g_free (attachment->name);
-  attachment->name = NULL;
+  attachment->name = nullptr;
 
   if (attachment->description)
     g_free (attachment->description);
-  attachment->description = NULL;
+  attachment->description = nullptr;
   
   if (attachment->checksum)
     g_string_free (attachment->checksum, TRUE);
-  attachment->checksum = NULL;
+  attachment->checksum = nullptr;
   
   G_OBJECT_CLASS (poppler_attachment_parent_class)->finalize (obj);
 }
@@ -100,9 +100,9 @@ _poppler_attachment_new (FileSpec *emb_file)
   PopplerAttachmentPrivate *priv;
   EmbFile *embFile;
 
-  g_assert (emb_file != NULL);
+  g_assert (emb_file != nullptr);
 
-  attachment = (PopplerAttachment *) g_object_new (POPPLER_TYPE_ATTACHMENT, NULL);
+  attachment = (PopplerAttachment *) g_object_new (POPPLER_TYPE_ATTACHMENT, nullptr);
   priv = POPPLER_ATTACHMENT_GET_PRIVATE (attachment);
 
   if (emb_file->getFileName ())
@@ -173,7 +173,7 @@ poppler_attachment_save (PopplerAttachment  *attachment,
 
   f = g_fopen (filename, "wb");
 
-  if (f == NULL)
+  if (f == nullptr)
     {
       gchar *display_name = g_filename_display_name (filename);
       g_set_error (error,
diff --git a/glib/poppler-cached-file-loader.cc b/glib/poppler-cached-file-loader.cc
index bf462b6d..2b4ed316 100644
--- a/glib/poppler-cached-file-loader.cc
+++ b/glib/poppler-cached-file-loader.cc
@@ -23,10 +23,10 @@
 PopplerCachedFileLoader::PopplerCachedFileLoader(GInputStream *inputStreamA, GCancellable *cancellableA, goffset lengthA)
 {
   inputStream = (GInputStream *)g_object_ref(inputStreamA);
-  cancellable = cancellableA ? (GCancellable *)g_object_ref(cancellableA) : NULL;
+  cancellable = cancellableA ? (GCancellable *)g_object_ref(cancellableA) : nullptr;
   length = lengthA;
-  url = NULL;
-  cachedFile = NULL;
+  url = nullptr;
+  cachedFile = nullptr;
 }
 
 PopplerCachedFileLoader::~PopplerCachedFileLoader()
@@ -51,7 +51,7 @@ size_t PopplerCachedFileLoader::init(GooString *urlA, CachedFile *cachedFileA)
   if (G_IS_FILE_INPUT_STREAM(inputStream)) {
     GFileInfo *info;
 
-    info = g_file_input_stream_query_info(G_FILE_INPUT_STREAM (inputStream), G_FILE_ATTRIBUTE_STANDARD_SIZE, cancellable, NULL);
+    info = g_file_input_stream_query_info(G_FILE_INPUT_STREAM (inputStream), G_FILE_ATTRIBUTE_STANDARD_SIZE, cancellable, nullptr);
     if (!info) {
       error(errInternal, -1, "Failed to get size of '{0:t}'.", urlA);
       return (size_t)-1;
@@ -64,10 +64,10 @@ size_t PopplerCachedFileLoader::init(GooString *urlA, CachedFile *cachedFileA)
   }
 
   // Unknown stream length, read the whole stream and return the size.
-  CachedFileWriter writer = CachedFileWriter(cachedFile, NULL);
+  CachedFileWriter writer = CachedFileWriter(cachedFile, nullptr);
   size = 0;
   do {
-    bytesRead = g_input_stream_read(inputStream, buf, CachedFileChunkSize, cancellable, NULL);
+    bytesRead = g_input_stream_read(inputStream, buf, CachedFileChunkSize, cancellable, nullptr);
     if (bytesRead == -1)
       break;
 
@@ -91,9 +91,9 @@ int PopplerCachedFileLoader::load(const std::vector<ByteRange> &ranges, CachedFi
   for (size_t i = 0; i < ranges.size(); i++) {
     bytesToRead = MIN(CachedFileChunkSize, ranges[i].length);
     rangeBytesRead = 0;
-    g_seekable_seek(G_SEEKABLE(inputStream), ranges[i].offset, G_SEEK_SET, cancellable, NULL);
+    g_seekable_seek(G_SEEKABLE(inputStream), ranges[i].offset, G_SEEK_SET, cancellable, nullptr);
     do {
-      bytesRead = g_input_stream_read(inputStream, buf, bytesToRead, cancellable, NULL);
+      bytesRead = g_input_stream_read(inputStream, buf, bytesToRead, cancellable, nullptr);
       if (bytesRead == -1)
         return -1;
 
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index 41b6a04b..e845bc12 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -125,10 +125,10 @@ _poppler_document_new_from_pdfdoc (PDFDoc  *newDoc,
     }
     
     delete newDoc;
-    return NULL;
+    return nullptr;
   }
 
-  document = (PopplerDocument *) g_object_new (POPPLER_TYPE_DOCUMENT, NULL);
+  document = (PopplerDocument *) g_object_new (POPPLER_TYPE_DOCUMENT, nullptr);
   document->doc = newDoc;
 
   document->output_dev = new CairoOutputDev ();
@@ -144,10 +144,10 @@ poppler_password_to_latin1 (const gchar *password)
   GooString *password_g;
 
   if (!password)
-    return NULL;
+    return nullptr;
 
   password_latin = g_convert(password, -1, "ISO-8859-1", "UTF-8",
-                             NULL, NULL, NULL);
+                             nullptr, nullptr, nullptr);
   password_g = new GooString (password_latin);
   g_free (password_latin);
 
@@ -179,9 +179,9 @@ poppler_document_new_from_file (const char  *uri,
     globalParams = new GlobalParams();
   }
 
-  filename = g_filename_from_uri (uri, NULL, error);
+  filename = g_filename_from_uri (uri, nullptr, error);
   if (!filename)
-    return NULL;
+    return nullptr;
 
   password_g = poppler_password_to_latin1(password);
 
@@ -189,7 +189,7 @@ poppler_document_new_from_file (const char  *uri,
   wchar_t *filenameW;
   int length;
 
-  length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
+  length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, nullptr, 0);
 
   filenameW = new WCHAR[length];
   if (!filenameW)
@@ -294,7 +294,7 @@ poppler_document_new_from_stream (GInputStream *stream,
   if (!G_IS_SEEKABLE(stream) || !g_seekable_can_seek(G_SEEKABLE(stream))) {
     g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
                         "Stream is not seekable");
-    return NULL;
+    return nullptr;
   }
 
   if (stream_is_memory_buffer_or_local_file(stream)) {
@@ -349,7 +349,7 @@ poppler_document_new_from_gfile (GFile        *file,
 
   stream = g_file_read(file, cancellable, error);
   if (!stream)
-    return NULL;
+    return nullptr;
 
   document = poppler_document_new_from_stream(G_INPUT_STREAM(stream), -1, password, cancellable, error);
   g_object_unref(stream);
@@ -408,8 +408,8 @@ poppler_document_save (PopplerDocument  *document,
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
 
-  filename = g_filename_from_uri (uri, NULL, error);
-  if (filename != NULL) {
+  filename = g_filename_from_uri (uri, nullptr, error);
+  if (filename != nullptr) {
     GooString *fname = new GooString (filename);
     int err_code;
     g_free (filename);
@@ -446,8 +446,8 @@ poppler_document_save_a_copy (PopplerDocument  *document,
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
 
-  filename = g_filename_from_uri (uri, NULL, error);
-  if (filename != NULL) {
+  filename = g_filename_from_uri (uri, nullptr, error);
+  if (filename != nullptr) {
     GooString *fname = new GooString (filename);
     int err_code;
     g_free (filename);
@@ -503,11 +503,11 @@ poppler_document_get_id (PopplerDocument *document,
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
 
   if (permanent_id)
-    *permanent_id = NULL;
+    *permanent_id = nullptr;
   if (update_id)
-    *update_id = NULL;
+    *update_id = nullptr;
 
-  if (document->doc->getID (permanent_id ? &permanent : NULL, update_id ? &update : NULL)) {
+  if (document->doc->getID (permanent_id ? &permanent : nullptr, update_id ? &update : nullptr)) {
     if (permanent_id)
       *permanent_id = (gchar *)g_memdup (permanent.getCString(), 32);
     if (update_id)
@@ -556,7 +556,7 @@ poppler_document_get_page (PopplerDocument  *document,
 			NULL);
 
   page = document->doc->getPage (index + 1);
-  if (!page) return NULL;
+  if (!page) return nullptr;
 
   return _poppler_page_new (document, page, index);
 }
@@ -584,7 +584,7 @@ poppler_document_get_page_by_label (PopplerDocument  *document,
 
   catalog = document->doc->getCatalog();
   if (!catalog->labelToIndex (&label_g, &index))
-    return NULL;
+    return nullptr;
 
   return poppler_document_get_page (document, index);
 }
@@ -643,13 +643,13 @@ poppler_document_get_attachments (PopplerDocument *document)
 {
   Catalog *catalog;
   int n_files, i;
-  GList *retval = NULL;
+  GList *retval = nullptr;
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
 
   catalog = document->doc->getCatalog ();
-  if (catalog == NULL || ! catalog->isOk ())
-    return NULL;
+  if (catalog == nullptr || ! catalog->isOk ())
+    return nullptr;
 
   n_files = catalog->numEmbeddedFiles ();
   for (i = 0; i < n_files; i++)
@@ -686,12 +686,12 @@ PopplerDest *
 poppler_document_find_dest (PopplerDocument *document,
 			    const gchar     *link_name)
 {
-	PopplerDest *dest = NULL;
-	LinkDest *link_dest = NULL;
+	PopplerDest *dest = nullptr;
+	LinkDest *link_dest = nullptr;
 	GooString *g_link_name;
 
 	g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
-	g_return_val_if_fail (link_name != NULL, NULL);
+	g_return_val_if_fail (link_name != nullptr, NULL);
 
 	g_link_name = new GooString (link_name);
 
@@ -710,8 +710,8 @@ poppler_document_find_dest (PopplerDocument *document,
 
 char *_poppler_goo_string_to_utf8(GooString *s)
 {
-  if (s == NULL) {
-    return NULL;
+  if (s == nullptr) {
+    return nullptr;
   }
 
   char *result;
@@ -719,7 +719,7 @@ char *_poppler_goo_string_to_utf8(GooString *s)
   if (s->hasUnicodeMarker()) {
     result = g_convert (s->getCString () + 2,
 			s->getLength () - 2,
-			"UTF-8", "UTF-16BE", NULL, NULL, NULL);
+			"UTF-8", "UTF-16BE", nullptr, nullptr, nullptr);
   } else {
     int len;
     gunichar *ucs4_temp;
@@ -732,7 +732,7 @@ char *_poppler_goo_string_to_utf8(GooString *s)
     }
     ucs4_temp[i] = 0;
 
-    result = g_ucs4_to_utf8 (ucs4_temp, -1, NULL, NULL, NULL);
+    result = g_ucs4_to_utf8 (ucs4_temp, -1, nullptr, nullptr, nullptr);
 
     g_free (ucs4_temp);
   }
@@ -743,15 +743,15 @@ char *_poppler_goo_string_to_utf8(GooString *s)
 static GooString *
 _poppler_goo_string_from_utf8(const gchar *src)
 {
-  if (src == NULL) {
-    return NULL;
+  if (src == nullptr) {
+    return nullptr;
   }
 
   gsize outlen;
 
-  gchar *utf16 = g_convert (src, -1, "UTF-16BE", "UTF-8", NULL, &outlen, NULL);
-  if (utf16 == NULL) {
-    return NULL;
+  gchar *utf16 = g_convert (src, -1, "UTF-16BE", "UTF-8", nullptr, &outlen, nullptr);
+  if (utf16 == nullptr) {
+    return nullptr;
   }
 
   GooString *result = new GooString (utf16, outlen);
@@ -895,7 +895,7 @@ poppler_document_set_title (PopplerDocument *document, const gchar *title)
 
   GooString *goo_title;
   if (!title) {
-    goo_title = NULL;
+    goo_title = nullptr;
   } else {
     goo_title = _poppler_goo_string_from_utf8(title);
     if (!goo_title)
@@ -944,7 +944,7 @@ poppler_document_set_author (PopplerDocument *document, const gchar *author)
 
   GooString *goo_author;
   if (!author) {
-    goo_author = NULL;
+    goo_author = nullptr;
   } else {
     goo_author = _poppler_goo_string_from_utf8(author);
     if (!goo_author)
@@ -993,7 +993,7 @@ poppler_document_set_subject (PopplerDocument *document, const gchar *subject)
 
   GooString *goo_subject;
   if (!subject) {
-    goo_subject = NULL;
+    goo_subject = nullptr;
   } else {
     goo_subject = _poppler_goo_string_from_utf8(subject);
     if (!goo_subject)
@@ -1042,7 +1042,7 @@ poppler_document_set_keywords (PopplerDocument *document, const gchar *keywords)
 
   GooString *goo_keywords;
   if (!keywords) {
-    goo_keywords = NULL;
+    goo_keywords = nullptr;
   } else {
     goo_keywords = _poppler_goo_string_from_utf8(keywords);
     if (!goo_keywords)
@@ -1093,7 +1093,7 @@ poppler_document_set_creator (PopplerDocument *document, const gchar *creator)
 
   GooString *goo_creator;
   if (!creator) {
-    goo_creator = NULL;
+    goo_creator = nullptr;
   } else {
     goo_creator = _poppler_goo_string_from_utf8(creator);
     if (!goo_creator)
@@ -1144,7 +1144,7 @@ poppler_document_set_producer (PopplerDocument *document, const gchar *producer)
 
   GooString *goo_producer;
   if (!producer) {
-    goo_producer = NULL;
+    goo_producer = nullptr;
   } else {
     goo_producer = _poppler_goo_string_from_utf8(producer);
     if (!goo_producer)
@@ -1169,7 +1169,7 @@ poppler_document_get_creation_date (PopplerDocument *document)
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), (time_t)-1);
 
   GooString *str = document->doc->getDocInfoCreatDate();
-  if (str == NULL) {
+  if (str == nullptr) {
     return (time_t)-1;
   }
 
@@ -1196,7 +1196,7 @@ poppler_document_set_creation_date (PopplerDocument *document,
 {
   g_return_if_fail (POPPLER_IS_DOCUMENT (document));
 
-  GooString *str = creation_date == (time_t)-1 ? NULL : timeToDateString (&creation_date);
+  GooString *str = creation_date == (time_t)-1 ? nullptr : timeToDateString (&creation_date);
   document->doc->setDocInfoCreatDate (str);
 }
 
@@ -1216,7 +1216,7 @@ poppler_document_get_modification_date (PopplerDocument *document)
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), (time_t)-1);
 
   GooString *str = document->doc->getDocInfoModDate();
-  if (str == NULL) {
+  if (str == nullptr) {
     return (time_t)-1;
   }
 
@@ -1243,7 +1243,7 @@ poppler_document_set_modification_date (PopplerDocument *document,
 {
   g_return_if_fail (POPPLER_IS_DOCUMENT (document));
 
-  GooString *str = modification_date == (time_t)-1 ? NULL : timeToDateString (&modification_date);
+  GooString *str = modification_date == (time_t)-1 ? nullptr : timeToDateString (&modification_date);
   document->doc->setDocInfoModDate (str);
 }
 
@@ -1367,7 +1367,7 @@ gchar *
 poppler_document_get_metadata (PopplerDocument *document)
 {
   Catalog *catalog;
-  gchar *retval = NULL;
+  gchar *retval = nullptr;
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
 
@@ -1375,7 +1375,7 @@ poppler_document_get_metadata (PopplerDocument *document)
   if (catalog && catalog->isOk ()) {
     GooString *s = catalog->readMetadata ();
 
-    if (s != NULL) {
+    if (s != nullptr) {
       retval = g_strdup (s->getCString());
       delete s;
     }
@@ -1402,11 +1402,11 @@ poppler_document_get_property (GObject    *object,
       g_value_take_string (value, poppler_document_get_pdf_version_string (document));
       break;
     case PROP_FORMAT_MAJOR:
-      poppler_document_get_pdf_version (document, &version, NULL);
+      poppler_document_get_pdf_version (document, &version, nullptr);
       g_value_set_uint (value, version);
       break;
     case PROP_FORMAT_MINOR:
-      poppler_document_get_pdf_version (document, NULL, &version);
+      poppler_document_get_pdf_version (document, nullptr, &version);
       g_value_set_uint (value, version);
       break;
     case PROP_AUTHOR:
@@ -1512,7 +1512,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("title",
 							"Document Title",
 							"The title of the document",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1525,7 +1525,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("format",
 							"PDF Format",
 							"The PDF version of the document",
-							NULL,
+							nullptr,
 							G_PARAM_READABLE));
 
   /**
@@ -1564,7 +1564,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("author",
 							"Author",
 							"The author of the document",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1577,7 +1577,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("subject",
 							"Subject",
 							"Subjects the document touches",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1590,7 +1590,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("keywords",
 							"Keywords",
 							"Keywords",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1603,7 +1603,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("creator",
 							"Creator",
 							"The software that created the document",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1616,7 +1616,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("producer",
 							"Producer",
 							"The software that converted the document",
-							NULL,
+							nullptr,
 							G_PARAM_READWRITE));
 
   /**
@@ -1722,7 +1722,7 @@ poppler_document_class_init (PopplerDocumentClass *klass)
 				   g_param_spec_string ("metadata",
 							"XML Metadata",
 							"Embedded XML metadata",
-							NULL,
+							nullptr,
 							G_PARAM_READABLE));
 }
 
@@ -1758,7 +1758,7 @@ poppler_index_iter_copy (PopplerIndexIter *iter)
 {
 	PopplerIndexIter *new_iter;
 
-	g_return_val_if_fail (iter != NULL, NULL);
+	g_return_val_if_fail (iter != nullptr, NULL);
 
 	new_iter = g_slice_dup (PopplerIndexIter, iter);
 	new_iter->document = (PopplerDocument *) g_object_ref (new_iter->document);
@@ -1813,12 +1813,12 @@ poppler_index_iter_new (PopplerDocument *document)
 	GooList *items;
 
 	outline = document->doc->getOutline();
-	if (outline == NULL)
-		return NULL;
+	if (outline == nullptr)
+		return nullptr;
 
 	items = outline->getItems();
-	if (items == NULL)
-		return NULL;
+	if (items == nullptr)
+		return nullptr;
 
 	iter = g_slice_new (PopplerIndexIter);
 	iter->document = (PopplerDocument *) g_object_ref (document);
@@ -1843,12 +1843,12 @@ poppler_index_iter_get_child (PopplerIndexIter *parent)
 	PopplerIndexIter *child;
 	OutlineItem *item;
 
-	g_return_val_if_fail (parent != NULL, NULL);
+	g_return_val_if_fail (parent != nullptr, NULL);
 	
 	item = (OutlineItem *)parent->items->get (parent->index);
 	item->open ();
 	if (! (item->hasKids() && item->getKids()) )
-		return NULL;
+		return nullptr;
 
 	child = g_slice_new0 (PopplerIndexIter);
 	child->document = (PopplerDocument *)g_object_ref (parent->document);
@@ -1863,8 +1863,8 @@ static gchar *
 unicode_to_char (Unicode *unicode,
 		 int      len)
 {
-	static UnicodeMap *uMap = NULL;
-	if (uMap == NULL) {
+	static UnicodeMap *uMap = nullptr;
+	if (uMap == nullptr) {
 		GooString *enc = new GooString("UTF-8");
 		uMap = globalParams->getUnicodeMap(enc);
 		uMap->incRefCnt ();
@@ -1920,7 +1920,7 @@ poppler_index_iter_get_action (PopplerIndexIter  *iter)
 	PopplerAction *action;
 	gchar *title;
 
-	g_return_val_if_fail (iter != NULL, NULL);
+	g_return_val_if_fail (iter != nullptr, NULL);
 
 	item = (OutlineItem *)iter->items->get (iter->index);
 	link_action = item->getAction ();
@@ -1946,7 +1946,7 @@ poppler_index_iter_get_action (PopplerIndexIter  *iter)
 gboolean
 poppler_index_iter_next (PopplerIndexIter *iter)
 {
-	g_return_val_if_fail (iter != NULL, FALSE);
+	g_return_val_if_fail (iter != nullptr, FALSE);
 
 	iter->index++;
 	if (iter->index >= iter->items->getLength())
@@ -1964,7 +1964,7 @@ poppler_index_iter_next (PopplerIndexIter *iter)
 void
 poppler_index_iter_free (PopplerIndexIter *iter)
 {
-	if (G_UNLIKELY (iter == NULL))
+	if (G_UNLIKELY (iter == nullptr))
 		return;
 
 	g_object_unref (iter->document);
@@ -1998,10 +1998,10 @@ poppler_fonts_iter_get_full_name (PopplerFontsIter *iter)
 	info = (FontInfo *)iter->items->get (iter->index);
 
 	name = info->getName();
-	if (name != NULL) {
+	if (name != nullptr) {
 		return info->getName()->getCString();
 	} else {
-		return NULL;
+		return nullptr;
 	}
 }
 
@@ -2053,10 +2053,10 @@ poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter)
 	info = (FontInfo *)iter->items->get (iter->index);
 
 	name = info->getSubstituteName();
-	if (name != NULL) {
+	if (name != nullptr) {
 		return name->getCString();
 	} else {
-		return NULL;
+		return nullptr;
 	}
 }
 
@@ -2078,10 +2078,10 @@ poppler_fonts_iter_get_file_name (PopplerFontsIter *iter)
 	info = (FontInfo *)iter->items->get (iter->index);
 
 	file = info->getFile();
-	if (file != NULL) {
+	if (file != nullptr) {
 		return file->getCString();
 	} else {
-		return NULL;
+		return nullptr;
 	}
 }
 
@@ -2098,7 +2098,7 @@ poppler_fonts_iter_get_font_type (PopplerFontsIter *iter)
 {
 	FontInfo *info;
 
-	g_return_val_if_fail (iter != NULL, POPPLER_FONT_TYPE_UNKNOWN);
+	g_return_val_if_fail (iter != nullptr, POPPLER_FONT_TYPE_UNKNOWN);
 
 	info = (FontInfo *)iter->items->get (iter->index);
 
@@ -2124,10 +2124,10 @@ poppler_fonts_iter_get_encoding (PopplerFontsIter *iter)
 	info = (FontInfo *)iter->items->get (iter->index);
 
 	encoding = info->getEncoding();
-	if (encoding != NULL) {
+	if (encoding != nullptr) {
 		return encoding->getCString();
 	} else {
-		return NULL;
+		return nullptr;
 	}
 }
 
@@ -2178,7 +2178,7 @@ poppler_fonts_iter_is_subset (PopplerFontsIter *iter)
 gboolean
 poppler_fonts_iter_next (PopplerFontsIter *iter)
 {
-	g_return_val_if_fail (iter != NULL, FALSE);
+	g_return_val_if_fail (iter != nullptr, FALSE);
 
 	iter->index++;
 	if (iter->index >= iter->items->getLength())
@@ -2200,7 +2200,7 @@ poppler_fonts_iter_copy (PopplerFontsIter *iter)
 {
 	PopplerFontsIter *new_iter;
 
-	g_return_val_if_fail (iter != NULL, NULL);
+	g_return_val_if_fail (iter != nullptr, NULL);
 
 	new_iter = g_slice_dup (PopplerFontsIter, iter);
 
@@ -2222,7 +2222,7 @@ poppler_fonts_iter_copy (PopplerFontsIter *iter)
 void
 poppler_fonts_iter_free (PopplerFontsIter *iter)
 {
-	if (G_UNLIKELY (iter == NULL))
+	if (G_UNLIKELY (iter == nullptr))
 		return;
 
 	deleteGooList (iter->items, FontInfo);
@@ -2265,8 +2265,8 @@ poppler_font_info_class_init (PopplerFontInfoClass *klass)
 static void
 poppler_font_info_init (PopplerFontInfo *font_info)
 {
-        font_info->document = NULL;
-        font_info->scanner = NULL;
+        font_info->document = nullptr;
+        font_info->scanner = nullptr;
 }
 
 static void
@@ -2296,7 +2296,7 @@ poppler_font_info_new (PopplerDocument *document)
 	g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
 
 	font_info = (PopplerFontInfo *) g_object_new (POPPLER_TYPE_FONT_INFO,
-						      NULL);
+						      nullptr);
 	font_info->document = (PopplerDocument *) g_object_ref (document);
 	font_info->scanner = new FontInfoScanner(document->doc);
 
@@ -2337,27 +2337,27 @@ poppler_font_info_scan (PopplerFontInfo   *font_info,
 {
 	GooList *items;
 
-	g_return_val_if_fail (iter != NULL, FALSE);
+	g_return_val_if_fail (iter != nullptr, FALSE);
 
 	items = font_info->scanner->scan(n_pages);
 
-	if (items == NULL) {
-		*iter = NULL;
+	if (items == nullptr) {
+		*iter = nullptr;
 	} else if (items->getLength() == 0) {
-		*iter = NULL;
+		*iter = nullptr;
 		delete items;
 	} else {
 		*iter = poppler_fonts_iter_new(items);
 	}
 	
-	return (items != NULL);
+	return (items != nullptr);
 }
 
 /* For backward compatibility */
 void
 poppler_font_info_free (PopplerFontInfo *font_info)
 {
-	g_return_if_fail (font_info != NULL);
+	g_return_if_fail (font_info != nullptr);
 
 	g_object_unref (font_info);
 }
@@ -2382,7 +2382,7 @@ layer_free (Layer *layer)
     return;
 
   if (layer->kids) {
-	  g_list_foreach (layer->kids, (GFunc)layer_free, NULL);
+	  g_list_foreach (layer->kids, (GFunc)layer_free, nullptr);
 	  g_list_free (layer->kids);
   }
 
@@ -2397,7 +2397,7 @@ static GList *
 get_optional_content_rbgroups (OCGs *ocg)
 {
   Array *rb;
-  GList *groups = NULL;
+  GList *groups = nullptr;
   
   rb = ocg->getRBGroupsArray ();
   
@@ -2406,7 +2406,7 @@ get_optional_content_rbgroups (OCGs *ocg)
 
     for (i = 0; i < rb->getLength (); ++i) {
       Array *rb_array;
-      GList *group = NULL;
+      GList *group = nullptr;
 
       Object obj = rb->get (i);
       if (!obj.isArray ()) {
@@ -2446,13 +2446,13 @@ _poppler_document_get_layer_rbgroup (PopplerDocument *document,
       return group;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 static GList *
 get_optional_content_items_sorted (OCGs *ocg, Layer *parent, Array *order)
 {
-  GList *items = NULL;
+  GList *items = nullptr;
   Layer *last_item = parent;
   int i;
 
@@ -2470,11 +2470,11 @@ get_optional_content_items_sorted (OCGs *ocg, Layer *parent, Array *order)
       }
     } else if (orderItem.isArray () && orderItem.arrayGetLength () > 0) {
       if (!last_item) {
-        last_item = layer_new (NULL);
+        last_item = layer_new (nullptr);
 	items = g_list_prepend (items, last_item);
       }
       last_item->kids = get_optional_content_items_sorted (ocg, last_item, orderItem.getArray ());
-      last_item = NULL;
+      last_item = nullptr;
     } else if (orderItem.isString ()) {
       last_item->label = _poppler_goo_string_to_utf8 (orderItem.getString ());
     }
@@ -2487,12 +2487,12 @@ static GList *
 get_optional_content_items (OCGs *ocg)
 {
   Array *order;
-  GList *items = NULL;
+  GList *items = nullptr;
   
   order = ocg->getOrderArray ();
 
   if (order) {
-    items = get_optional_content_items_sorted (ocg, NULL, order);
+    items = get_optional_content_items_sorted (ocg, nullptr, order);
   } else {
     GooList *ocgs;
     int i;
@@ -2520,7 +2520,7 @@ _poppler_document_get_layers (PopplerDocument *document)
     OCGs *ocg = catalog->getOptContentConfig ();
 
     if (!ocg)
-      return NULL;
+      return nullptr;
     
     document->layers = get_optional_content_items (ocg);
     document->layers_rbgroups = get_optional_content_rbgroups (ocg);
@@ -2535,14 +2535,14 @@ poppler_document_layers_free (PopplerDocument *document)
   if (G_UNLIKELY (!document->layers))
     return;
 
-  g_list_foreach (document->layers, (GFunc)layer_free, NULL);
+  g_list_foreach (document->layers, (GFunc)layer_free, nullptr);
   g_list_free (document->layers);
 
-  g_list_foreach (document->layers_rbgroups, (GFunc)g_list_free, NULL);
+  g_list_foreach (document->layers_rbgroups, (GFunc)g_list_free, nullptr);
   g_list_free (document->layers_rbgroups);
 
-  document->layers = NULL;
-  document->layers_rbgroups = NULL;
+  document->layers = nullptr;
+  document->layers_rbgroups = nullptr;
 }
 
 /* PopplerLayersIter */
@@ -2572,7 +2572,7 @@ poppler_layers_iter_copy (PopplerLayersIter *iter)
 {
   PopplerLayersIter *new_iter;
 
-  g_return_val_if_fail (iter != NULL, NULL);
+  g_return_val_if_fail (iter != nullptr, NULL);
   
   new_iter = g_slice_dup (PopplerLayersIter, iter);
   new_iter->document = (PopplerDocument *) g_object_ref (new_iter->document);
@@ -2591,7 +2591,7 @@ poppler_layers_iter_copy (PopplerLayersIter *iter)
 void
 poppler_layers_iter_free (PopplerLayersIter *iter)
 {
-  if (G_UNLIKELY (iter == NULL))
+  if (G_UNLIKELY (iter == nullptr))
     return;
 
   g_object_unref (iter->document);
@@ -2613,7 +2613,7 @@ poppler_layers_iter_new (PopplerDocument *document)
   items = _poppler_document_get_layers (document);
 
   if (!items)
-    return NULL;
+    return nullptr;
 
   iter = g_slice_new0 (PopplerLayersIter);
   iter->document = (PopplerDocument *)g_object_ref (document);
@@ -2639,11 +2639,11 @@ poppler_layers_iter_get_child (PopplerLayersIter *parent)
   PopplerLayersIter *child;
   Layer *layer;
 
-  g_return_val_if_fail (parent != NULL, NULL);
+  g_return_val_if_fail (parent != nullptr, NULL);
 	
   layer = (Layer *) g_list_nth_data (parent->items, parent->index);
   if (!layer || !layer->kids)
-    return NULL;
+    return nullptr;
 
   child = g_slice_new0 (PopplerLayersIter);
   child->document = (PopplerDocument *)g_object_ref (parent->document);
@@ -2671,11 +2671,11 @@ poppler_layers_iter_get_title (PopplerLayersIter *iter)
 {
   Layer *layer;
   
-  g_return_val_if_fail (iter != NULL, NULL);
+  g_return_val_if_fail (iter != nullptr, NULL);
   
   layer = (Layer *)g_list_nth_data (iter->items, iter->index);
 
-  return layer->label ? g_strdup (layer->label) : NULL;
+  return layer->label ? g_strdup (layer->label) : nullptr;
 }
 
 /**
@@ -2693,13 +2693,13 @@ PopplerLayer *
 poppler_layers_iter_get_layer (PopplerLayersIter *iter)
 {
   Layer *layer;
-  PopplerLayer *poppler_layer = NULL;
+  PopplerLayer *poppler_layer = nullptr;
   
-  g_return_val_if_fail (iter != NULL, NULL);
+  g_return_val_if_fail (iter != nullptr, NULL);
   
   layer = (Layer *)g_list_nth_data (iter->items, iter->index);
   if (layer->oc) {
-    GList *rb_group = NULL;
+    GList *rb_group = nullptr;
 
     rb_group = _poppler_document_get_layer_rbgroup (iter->document, layer);
     poppler_layer = _poppler_layer_new (iter->document, layer, rb_group);
@@ -2722,7 +2722,7 @@ poppler_layers_iter_get_layer (PopplerLayersIter *iter)
 gboolean
 poppler_layers_iter_next (PopplerLayersIter *iter)
 {
-  g_return_val_if_fail (iter != NULL, FALSE);
+  g_return_val_if_fail (iter != nullptr, FALSE);
 
   iter->index++;
   if (iter->index >= (gint)g_list_length (iter->items))
@@ -2753,7 +2753,7 @@ poppler_ps_file_class_init (PopplerPSFileClass *klass)
 static void
 poppler_ps_file_init (PopplerPSFile *ps_file)
 {
-        ps_file->out = NULL;
+        ps_file->out = nullptr;
         ps_file->paper_width = -1;
         ps_file->paper_height = -1;
         ps_file->duplex = FALSE;
@@ -2789,10 +2789,10 @@ poppler_ps_file_new (PopplerDocument *document, const char *filename,
 	PopplerPSFile *ps_file;
 
 	g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
-	g_return_val_if_fail (filename != NULL, NULL);
+	g_return_val_if_fail (filename != nullptr, NULL);
 	g_return_val_if_fail (n_pages > 0, NULL);
 
-        ps_file = (PopplerPSFile *) g_object_new (POPPLER_TYPE_PS_FILE, NULL);
+        ps_file = (PopplerPSFile *) g_object_new (POPPLER_TYPE_PS_FILE, nullptr);
 	ps_file->document = (PopplerDocument *) g_object_ref (document);
         ps_file->filename = g_strdup (filename);
         ps_file->first_page = first_page + 1;
@@ -2816,7 +2816,7 @@ void
 poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
                                 double width, double height)
 {
-        g_return_if_fail (ps_file->out == NULL);
+        g_return_if_fail (ps_file->out == nullptr);
         
         ps_file->paper_width = width;
         ps_file->paper_height = height;
@@ -2833,7 +2833,7 @@ poppler_ps_file_set_paper_size (PopplerPSFile *ps_file,
 void
 poppler_ps_file_set_duplex (PopplerPSFile *ps_file, gboolean duplex)
 {
-        g_return_if_fail (ps_file->out == NULL);
+        g_return_if_fail (ps_file->out == nullptr);
 
         ps_file->duplex = duplex;
 }
@@ -2848,7 +2848,7 @@ poppler_ps_file_set_duplex (PopplerPSFile *ps_file, gboolean duplex)
 void
 poppler_ps_file_free (PopplerPSFile *ps_file)
 {
-	g_return_if_fail (ps_file != NULL);
+	g_return_if_fail (ps_file != nullptr);
         g_object_unref (ps_file);
 }
 
@@ -2877,17 +2877,17 @@ poppler_document_get_form_field (PopplerDocument *document,
 
   page = document->doc->getPage (pageNum);
   if (!page)
-    return NULL;
+    return nullptr;
 
   widgets = page->getFormWidgets ();
   if (!widgets)
-    return NULL;
+    return nullptr;
 
   field = widgets->getWidget (fieldNum);
   if (field)
     return _poppler_form_field_new (document, field);
 
-  return NULL;
+  return nullptr;
 }
 
 gboolean
@@ -2900,7 +2900,7 @@ _poppler_convert_pdf_date_to_gtime (GooString *date,
   if (date->hasUnicodeMarker()) {
     date_string = g_convert (date->getCString () + 2,
 			     date->getLength () - 2,
-			     "UTF-8", "UTF-16BE", NULL, NULL, NULL);		
+			     "UTF-8", "UTF-16BE", nullptr, nullptr, nullptr);		
   } else {
     date_string = g_strndup (date->getCString (), date->getLength ());
   }
diff --git a/glib/poppler-form-field.cc b/glib/poppler-form-field.cc
index df184dd0..a6cb8209 100644
--- a/glib/poppler-form-field.cc
+++ b/glib/poppler-form-field.cc
@@ -43,14 +43,14 @@ poppler_form_field_finalize (GObject *object)
   if (field->document)
     {
       g_object_unref (field->document);
-      field->document = NULL;
+      field->document = nullptr;
     }
   if (field->action)
     {
       poppler_action_free (field->action);
-      field->action = NULL;
+      field->action = nullptr;
     }
-  field->widget = NULL;
+  field->widget = nullptr;
 
   G_OBJECT_CLASS (poppler_form_field_parent_class)->finalize (object);
 }
@@ -75,9 +75,9 @@ _poppler_form_field_new (PopplerDocument *document,
   PopplerFormField *poppler_field;
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
-  g_return_val_if_fail (field != NULL, NULL);
+  g_return_val_if_fail (field != nullptr, NULL);
 
-  poppler_field = POPPLER_FORM_FIELD (g_object_new (POPPLER_TYPE_FORM_FIELD, NULL));
+  poppler_field = POPPLER_FORM_FIELD (g_object_new (POPPLER_TYPE_FORM_FIELD, nullptr));
 
   poppler_field->document = (PopplerDocument *)g_object_ref (document);
   poppler_field->widget = field;
@@ -186,9 +186,9 @@ poppler_form_field_get_action (PopplerFormField *field)
 
   action = field->widget->getActivationAction();
   if (!action)
-    return NULL;
+    return nullptr;
 
-  field->action = _poppler_action_new (field->document, action, NULL);
+  field->action = _poppler_action_new (field->document, action, nullptr);
 
   return field->action;
 }
@@ -273,7 +273,7 @@ poppler_form_field_get_partial_name (PopplerFormField *field)
 
   tmp = field->widget->getPartialName();
 
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
 
 /**
@@ -296,7 +296,7 @@ poppler_form_field_get_mapping_name (PopplerFormField *field)
 
   tmp = field->widget->getMappingName();
 
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
 
 /**
@@ -319,7 +319,7 @@ poppler_form_field_get_name (PopplerFormField *field)
 
   tmp = field->widget->getFullyQualifiedName();
 
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
 
 /* Text Field */
@@ -367,7 +367,7 @@ poppler_form_field_text_get_text (PopplerFormField *field)
   text_field = static_cast<FormWidgetText*>(field->widget);
   tmp = text_field->getContent ();
 
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
 
 /**
@@ -387,7 +387,7 @@ poppler_form_field_text_set_text (PopplerFormField *field,
 	
   g_return_if_fail (field->widget->getType () == formText);
 
-  tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+  tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", nullptr, &length, nullptr) : nullptr;
   goo_tmp = new GooString (tmp, length);
   g_free (tmp);
   static_cast<FormWidgetText*>(field->widget)->setContent (goo_tmp);
@@ -577,7 +577,7 @@ poppler_form_field_choice_get_item (PopplerFormField *field,
   g_return_val_if_fail (index >= 0 && index < poppler_form_field_choice_get_n_items (field), NULL);
 
   tmp = static_cast<FormWidgetChoice*>(field->widget)->getChoice (index);
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
 
 /**
@@ -664,7 +664,7 @@ poppler_form_field_choice_set_text (PopplerFormField *field,
 
   g_return_if_fail (field->widget->getType () == formChoice);
 
-  tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", NULL, &length, NULL) : NULL;
+  tmp = text ? g_convert (text, -1, "UTF-16BE", "UTF-8", nullptr, &length, nullptr) : nullptr;
   goo_tmp = new GooString (tmp, length);
   g_free (tmp);
   static_cast<FormWidgetChoice*>(field->widget)->setEditChoice (goo_tmp);
@@ -687,5 +687,5 @@ poppler_form_field_choice_get_text (PopplerFormField *field)
   g_return_val_if_fail (field->widget->getType () == formChoice, NULL);
 
   tmp = static_cast<FormWidgetChoice*>(field->widget)->getEditChoice ();
-  return tmp ? _poppler_goo_string_to_utf8 (tmp) : NULL;
+  return tmp ? _poppler_goo_string_to_utf8 (tmp) : nullptr;
 }
diff --git a/glib/poppler-input-stream.cc b/glib/poppler-input-stream.cc
index cf7a5040..20336826 100644
--- a/glib/poppler-input-stream.cc
+++ b/glib/poppler-input-stream.cc
@@ -25,7 +25,7 @@ PopplerInputStream::PopplerInputStream(GInputStream *inputStreamA, GCancellable
   : BaseStream(std::move(dictA), lengthA)
 {
   inputStream = (GInputStream *)g_object_ref(inputStreamA);
-  cancellable = cancellableA ? (GCancellable *)g_object_ref(cancellableA) : NULL;
+  cancellable = cancellableA ? (GCancellable *)g_object_ref(cancellableA) : nullptr;
   start = startA;
   limited = limitedA;
   length = lengthA;
@@ -58,7 +58,7 @@ void PopplerInputStream::reset()
   GSeekable *seekable = G_SEEKABLE(inputStream);
 
   savePos = (Guint)g_seekable_tell(seekable);
-  g_seekable_seek(seekable, start, G_SEEK_SET, cancellable, NULL);
+  g_seekable_seek(seekable, start, G_SEEK_SET, cancellable, nullptr);
   saved = gTrue;
   bufPtr = bufEnd = buf;
   bufPos = start;
@@ -68,7 +68,7 @@ void PopplerInputStream::close()
 {
   if (!saved)
     return;
-  g_seekable_seek(G_SEEKABLE(inputStream), savePos, G_SEEK_SET, cancellable, NULL);
+  g_seekable_seek(G_SEEKABLE(inputStream), savePos, G_SEEK_SET, cancellable, nullptr);
   saved = gFalse;
 }
 
@@ -78,16 +78,16 @@ void PopplerInputStream::setPos(Goffset pos, int dir)
   GSeekable *seekable = G_SEEKABLE(inputStream);
 
   if (dir >= 0) {
-    g_seekable_seek(seekable, pos, G_SEEK_SET, cancellable, NULL);
+    g_seekable_seek(seekable, pos, G_SEEK_SET, cancellable, nullptr);
     bufPos = pos;
   } else {
-    g_seekable_seek(seekable, 0, G_SEEK_END, cancellable, NULL);
+    g_seekable_seek(seekable, 0, G_SEEK_END, cancellable, nullptr);
     size = (Guint)g_seekable_tell(seekable);
 
     if (pos > size)
       pos = size;
 
-    g_seekable_seek(seekable, -(goffset)pos, G_SEEK_END, cancellable, NULL);
+    g_seekable_seek(seekable, -(goffset)pos, G_SEEK_END, cancellable, nullptr);
     bufPos = (Guint)g_seekable_tell(seekable);
   }
   bufPtr = bufEnd = buf;
@@ -116,7 +116,7 @@ GBool PopplerInputStream::fillBuf()
     n = inputStreamBufSize - (bufPos % inputStreamBufSize);
   }
 
-  n = g_input_stream_read(inputStream, buf, n, cancellable, NULL);
+  n = g_input_stream_read(inputStream, buf, n, cancellable, nullptr);
   bufEnd = buf + n;
   if (bufPtr >= bufEnd) {
     return gFalse;
diff --git a/glib/poppler-layer.cc b/glib/poppler-layer.cc
index 4c6bf6e5..f97b8b61 100644
--- a/glib/poppler-layer.cc
+++ b/glib/poppler-layer.cc
@@ -42,16 +42,16 @@ poppler_layer_finalize (GObject *object)
   if (poppler_layer->document)
     {
       g_object_unref (poppler_layer->document);
-      poppler_layer->document = NULL;
+      poppler_layer->document = nullptr;
     }
 
   if (poppler_layer->title)
     {
       g_free (poppler_layer->title);
-      poppler_layer->title = NULL;
+      poppler_layer->title = nullptr;
     }
-  poppler_layer->layer = NULL;
-  poppler_layer->rbgroup = NULL;
+  poppler_layer->layer = nullptr;
+  poppler_layer->rbgroup = nullptr;
 
   G_OBJECT_CLASS (poppler_layer_parent_class)->finalize (object);
 }
@@ -78,15 +78,15 @@ _poppler_layer_new (PopplerDocument *document,
   GooString    *layer_name;
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
-  g_return_val_if_fail (layer != NULL, NULL);
+  g_return_val_if_fail (layer != nullptr, NULL);
 
-  poppler_layer = POPPLER_LAYER (g_object_new (POPPLER_TYPE_LAYER, NULL));
+  poppler_layer = POPPLER_LAYER (g_object_new (POPPLER_TYPE_LAYER, nullptr));
 
   poppler_layer->document = (PopplerDocument *)g_object_ref (document);
   poppler_layer->layer = layer;
   poppler_layer->rbgroup = rbgroup;
   layer_name = layer->oc->getName ();
-  poppler_layer->title = layer_name ? _poppler_goo_string_to_utf8 (layer_name) : NULL;
+  poppler_layer->title = layer_name ? _poppler_goo_string_to_utf8 (layer_name) : nullptr;
   
   return poppler_layer;
 }
@@ -200,7 +200,7 @@ poppler_layer_is_parent (PopplerLayer *poppler_layer)
 {
   g_return_val_if_fail (POPPLER_IS_LAYER (poppler_layer), FALSE);
 
-  return poppler_layer->layer->kids != NULL;
+  return poppler_layer->layer->kids != nullptr;
 }
 
 /**
diff --git a/glib/poppler-media.cc b/glib/poppler-media.cc
index e254f53b..309c0d46 100644
--- a/glib/poppler-media.cc
+++ b/glib/poppler-media.cc
@@ -57,12 +57,12 @@ poppler_media_finalize (GObject *object)
 
   if (media->filename) {
     g_free (media->filename);
-    media->filename = NULL;
+    media->filename = nullptr;
   }
 
   if (media->mime_type) {
     g_free (media->mime_type);
-    media->mime_type = NULL;
+    media->mime_type = nullptr;
   }
 
   media->stream = Object();
@@ -88,9 +88,9 @@ _poppler_media_new (MediaRendition *poppler_media)
 {
   PopplerMedia *media;
 
-  g_assert (poppler_media != NULL);
+  g_assert (poppler_media != nullptr);
 
-  media = POPPLER_MEDIA (g_object_new (POPPLER_TYPE_MEDIA, NULL));
+  media = POPPLER_MEDIA (g_object_new (POPPLER_TYPE_MEDIA, nullptr));
 
   if (poppler_media->getIsEmbedded()) {
     GooString* mime_type;
@@ -216,7 +216,7 @@ poppler_media_save (PopplerMedia *poppler_media,
 
   f = g_fopen (filename, "wb");
 
-  if (f == NULL)
+  if (f == nullptr)
     {
       gchar *display_name = g_filename_display_name (filename);
       g_set_error (error,
diff --git a/glib/poppler-movie.cc b/glib/poppler-movie.cc
index f066cf1c..894ae182 100644
--- a/glib/poppler-movie.cc
+++ b/glib/poppler-movie.cc
@@ -54,7 +54,7 @@ poppler_movie_finalize (GObject *object)
 
   if (movie->filename) {
     g_free (movie->filename);
-    movie->filename = NULL;
+    movie->filename = nullptr;
   }
 
   G_OBJECT_CLASS (poppler_movie_parent_class)->finalize (object);
@@ -78,9 +78,9 @@ _poppler_movie_new (Movie *poppler_movie)
 {
   PopplerMovie *movie;
 
-  g_assert (poppler_movie != NULL);
+  g_assert (poppler_movie != nullptr);
 
-  movie = POPPLER_MOVIE (g_object_new (POPPLER_TYPE_MOVIE, NULL));
+  movie = POPPLER_MOVIE (g_object_new (POPPLER_TYPE_MOVIE, nullptr));
 
   movie->filename = g_strdup (poppler_movie->getFileName()->getCString());
   if (poppler_movie->getShowPoster()) {
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index a44edac6..6b511692 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -60,7 +60,7 @@ _poppler_page_new (PopplerDocument *document, Page *page, int index)
 
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
 
-  poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, NULL, NULL);
+  poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, nullptr, NULL);
   poppler_page->document = (PopplerDocument *) g_object_ref (document);
   poppler_page->page = page;
   poppler_page->index = index;
@@ -74,9 +74,9 @@ poppler_page_finalize (GObject *object)
   PopplerPage *page = POPPLER_PAGE (object);
 
   g_object_unref (page->document);
-  page->document = NULL;
+  page->document = nullptr;
 
-  if (page->text != NULL) 
+  if (page->text != nullptr) 
     page->text->decRefCnt();
   /* page->page is owned by the document */
 
@@ -110,9 +110,9 @@ poppler_page_get_size (PopplerPage *page,
     page_height = page->page->getCropHeight ();
   }
 
-  if (width != NULL)
+  if (width != nullptr)
     *width = page_width;
-  if (height != NULL)
+  if (height != nullptr)
     *height = page_height;
 }
 
@@ -192,7 +192,7 @@ poppler_page_get_transition (PopplerPage *page)
 
   if (!trans->isOk ()) {
     delete trans;
-    return NULL;
+    return nullptr;
   }
 
   transition = poppler_page_transition_new ();
@@ -261,18 +261,18 @@ poppler_page_get_transition (PopplerPage *page)
 static TextPage *
 poppler_page_get_text_page (PopplerPage *page)
 {
-  if (page->text == NULL) {
+  if (page->text == nullptr) {
     TextOutputDev *text_dev;
     Gfx           *gfx;
 
-    text_dev = new TextOutputDev (NULL, gTrue, 0, gFalse, gFalse);
+    text_dev = new TextOutputDev (nullptr, gTrue, 0, gFalse, gFalse);
     gfx = page->page->createGfx(text_dev,
 				72.0, 72.0, 0,
 				gFalse, /* useMediaBox */
 				gTrue, /* Crop */
 				-1, -1, -1, -1,
 				gFalse, /* printing */
-				NULL, NULL);
+				nullptr, nullptr);
     page->page->display(gfx);
     text_dev->endPage();
 
@@ -343,7 +343,7 @@ _poppler_page_render (PopplerPage      *page,
   output_dev->setPrinting (printing);
 
 
-  if (!printing && page->text == NULL) {
+  if (!printing && page->text == nullptr) {
     page->text = new TextPage (gFalse);
     output_dev->setTextPage (page->text);
   }
@@ -357,13 +357,13 @@ _poppler_page_render (PopplerPage      *page,
 			   -1, -1,
 			   -1, -1,
 			   printing,
-			   NULL, NULL,
-			   printing ? poppler_print_annot_cb : NULL,
-                           printing ? GINT_TO_POINTER ((gint)print_flags) : NULL);
+			   nullptr, nullptr,
+			   printing ? poppler_print_annot_cb : nullptr,
+                           printing ? GINT_TO_POINTER ((gint)print_flags) : nullptr);
   cairo_restore (cairo);
 
-  output_dev->setCairo (NULL);
-  output_dev->setTextPage (NULL);
+  output_dev->setCairo (nullptr);
+  output_dev->setTextPage (nullptr);
 }
 
 /**
@@ -435,7 +435,7 @@ create_surface_from_thumbnail_data (guchar *data,
 
   surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
   if (cairo_surface_status (surface))
-    return NULL;
+    return nullptr;
 
   cairo_pixels = cairo_image_surface_get_data (surface);
   cairo_stride = cairo_image_surface_get_stride (surface);
@@ -488,7 +488,7 @@ poppler_page_get_thumbnail (PopplerPage *page)
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
 
   if (!page->page->loadThumb (&data, &width, &height, &rowstride))
-    return NULL;
+    return nullptr;
 
   surface = create_surface_from_thumbnail_data (data, width, height, rowstride);
   gfree (data);
@@ -566,7 +566,7 @@ poppler_page_render_selection (PopplerPage           *page,
 		       &pdf_selection, selection_style,
 		       &gfx_glyph_color, &gfx_background_color);
 
-  output_dev->setCairo (NULL);
+  output_dev->setCairo (nullptr);
 }
 
 /**
@@ -591,8 +591,8 @@ poppler_page_get_thumbnail_size (PopplerPage *page,
   gboolean retval = FALSE;
 
   g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
-  g_return_val_if_fail (width != NULL, FALSE);
-  g_return_val_if_fail (height != NULL, FALSE);
+  g_return_val_if_fail (width != nullptr, FALSE);
+  g_return_val_if_fail (height != nullptr, FALSE);
 
   Object thumb = page->page->getThumb ();
   if (!thumb.isStream ())
@@ -637,7 +637,7 @@ poppler_page_get_selection_region (PopplerPage           *page,
   TextPage *text;
   SelectionStyle selection_style = selectionStyleGlyph;
   GooList *list;
-  GList *region = NULL;
+  GList *region = nullptr;
   int i;
 
   poppler_selection.x1 = selection->x1;
@@ -698,7 +698,7 @@ poppler_page_selection_region_free (GList *region)
   if (G_UNLIKELY (!region))
     return;
 
-  g_list_foreach (region, (GFunc)poppler_rectangle_free, NULL);
+  g_list_foreach (region, (GFunc)poppler_rectangle_free, nullptr);
   g_list_free (region);
 }
 
@@ -796,7 +796,7 @@ poppler_page_get_selected_text (PopplerPage          *page,
   PDFRectangle pdf_selection;
 
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
-  g_return_val_if_fail (selection != NULL, NULL);
+  g_return_val_if_fail (selection != nullptr, NULL);
 
   pdf_selection.x1 = selection->x1;
   pdf_selection.y1 = selection->y1;
@@ -862,7 +862,7 @@ poppler_page_get_text_for_area (PopplerPage      *page,
                                 PopplerRectangle *area)
 {
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
-  g_return_val_if_fail (area != NULL, NULL);
+  g_return_val_if_fail (area != nullptr, NULL);
 
   return poppler_page_get_selected_text (page, POPPLER_SELECTION_GLYPH, area);
 }
@@ -898,15 +898,15 @@ poppler_page_find_text_with_options (PopplerPage     *page,
   gboolean start_at_last = FALSE;
 
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
-  g_return_val_if_fail (text != NULL, NULL);
+  g_return_val_if_fail (text != nullptr, NULL);
 
   text_dev = poppler_page_get_text_page (page);
 
   ucs4 = g_utf8_to_ucs4_fast (text, -1, &ucs4_len);
-  poppler_page_get_size (page, NULL, &height);
+  poppler_page_get_size (page, nullptr, &height);
 
   backwards = options & POPPLER_FIND_BACKWARDS;
-  matches = NULL;
+  matches = nullptr;
   xMin = 0;
   yMin = backwards ? height : 0;
 
@@ -972,7 +972,7 @@ poppler_page_get_image_output_dev (PopplerPage *page,
 			      gTrue, /* Crop */
 			      -1, -1, -1, -1,
 			      gFalse, /* printing */
-			      NULL, NULL);
+			      nullptr, nullptr);
   page->page->display(gfx);
   delete gfx;
 
@@ -992,13 +992,13 @@ poppler_page_get_image_output_dev (PopplerPage *page,
 GList *
 poppler_page_get_image_mapping (PopplerPage *page)
 {
-  GList *map_list = NULL;
+  GList *map_list = nullptr;
   CairoImageOutputDev *out;
   gint i;
   
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
 
-  out = poppler_page_get_image_output_dev (page, NULL, NULL);
+  out = poppler_page_get_image_output_dev (page, nullptr, nullptr);
 
   for (i = 0; i < out->getNumImages (); i++) {
     PopplerImageMapping *mapping;
@@ -1057,14 +1057,14 @@ poppler_page_get_image (PopplerPage *page,
   if (image_id >= out->getNumImages ()) {
     delete out;
     
-    return NULL;
+    return nullptr;
   }
 
   image = out->getImage (image_id)->getImage ();
   if (!image) {
     delete out;
 
-    return NULL;
+    return nullptr;
   }
 
   cairo_surface_reference (image);
@@ -1084,10 +1084,10 @@ poppler_page_get_image (PopplerPage *page,
 void
 poppler_page_free_image_mapping (GList *list)
 {
-  if (G_UNLIKELY (list == NULL))
+  if (G_UNLIKELY (list == nullptr))
     return;
 
-  g_list_foreach (list, (GFunc)poppler_image_mapping_free, NULL);
+  g_list_foreach (list, (GFunc)poppler_image_mapping_free, nullptr);
   g_list_free (list);
 }
 
@@ -1104,7 +1104,7 @@ poppler_page_render_to_ps (PopplerPage   *page,
 			   PopplerPSFile *ps_file)
 {
   g_return_if_fail (POPPLER_IS_PAGE (page));
-  g_return_if_fail (ps_file != NULL);
+  g_return_if_fail (ps_file != nullptr);
 
   if (!ps_file->out)  {
     std::vector<int> pages;
@@ -1113,7 +1113,7 @@ poppler_page_render_to_ps (PopplerPage   *page,
     }
     ps_file->out = new PSOutputDev (ps_file->filename,
                                     ps_file->document->doc,
-                                    NULL, pages,
+                                    nullptr, pages,
                                     psModePS, (int)ps_file->paper_width,
                                     (int)ps_file->paper_height, ps_file->duplex,
                                     0, 0, 0, 0, gFalse, gFalse);
@@ -1160,7 +1160,7 @@ poppler_page_class_init (PopplerPageClass *klass)
 				   g_param_spec_string ("label",
 							"Page Label",
 							"The label of the page",
-							NULL,
+							nullptr,
 							G_PARAM_READABLE));
 }
 
@@ -1182,7 +1182,7 @@ poppler_page_init (PopplerPage *page)
 GList *
 poppler_page_get_link_mapping (PopplerPage *page)
 {
-  GList *map_list = NULL;
+  GList *map_list = nullptr;
   gint i;
   Links *links;
   double width, height;
@@ -1191,8 +1191,8 @@ poppler_page_get_link_mapping (PopplerPage *page)
   
   links = new Links (page->page->getAnnots ());
 
-  if (links == NULL)
-    return NULL;
+  if (links == nullptr)
+    return nullptr;
   
   poppler_page_get_size (page, &width, &height);
   
@@ -1208,7 +1208,7 @@ poppler_page_get_link_mapping (PopplerPage *page)
       
       /* Create the mapping */
       mapping = poppler_link_mapping_new ();
-      mapping->action = _poppler_action_new (page->document, link_action, NULL);
+      mapping->action = _poppler_action_new (page->document, link_action, nullptr);
 
       link->getRect (&rect.x1, &rect.y1, &rect.x2, &rect.y2);
 
@@ -1268,10 +1268,10 @@ poppler_page_get_link_mapping (PopplerPage *page)
 void
 poppler_page_free_link_mapping (GList *list)
 {
-  if (G_UNLIKELY (list == NULL))
+  if (G_UNLIKELY (list == nullptr))
     return;
 
-  g_list_foreach (list, (GFunc)poppler_link_mapping_free, NULL);
+  g_list_foreach (list, (GFunc)poppler_link_mapping_free, nullptr);
   g_list_free (list);
 }
 
@@ -1288,7 +1288,7 @@ poppler_page_free_link_mapping (GList *list)
 GList *
 poppler_page_get_form_field_mapping (PopplerPage *page)
 {
-  GList *map_list = NULL;
+  GList *map_list = nullptr;
   FormPageWidgets *forms;
   gint i;
   
@@ -1296,8 +1296,8 @@ poppler_page_get_form_field_mapping (PopplerPage *page)
 
   forms = page->page->getFormWidgets ();
 
-  if (forms == NULL)
-    return NULL;
+  if (forms == nullptr)
+    return nullptr;
   
   for (i = 0; i < forms->getNumWidgets (); i++) {
     PopplerFormFieldMapping *mapping;
@@ -1335,10 +1335,10 @@ poppler_page_get_form_field_mapping (PopplerPage *page)
 void
 poppler_page_free_form_field_mapping (GList *list)
 {
-  if (G_UNLIKELY (list == NULL))
+  if (G_UNLIKELY (list == nullptr))
     return;
 
-  g_list_foreach (list, (GFunc) poppler_form_field_mapping_free, NULL);
+  g_list_foreach (list, (GFunc) poppler_form_field_mapping_free, nullptr);
   g_list_free (list);
 }
 
@@ -1355,7 +1355,7 @@ poppler_page_free_form_field_mapping (GList *list)
 GList *
 poppler_page_get_annot_mapping (PopplerPage *page)
 {
-  GList *map_list = NULL;
+  GList *map_list = nullptr;
   double width, height;
   gint i;
   Annots *annots;
@@ -1364,7 +1364,7 @@ poppler_page_get_annot_mapping (PopplerPage *page)
 
   annots = page->page->getAnnots ();
   if (!annots)
-    return NULL;
+    return nullptr;
 
   poppler_page_get_size (page, &width, &height);
 
@@ -1475,7 +1475,7 @@ poppler_page_free_annot_mapping (GList *list)
   if (G_UNLIKELY (!list))
     return;
 
-  g_list_foreach (list, (GFunc)poppler_annot_mapping_free, NULL);
+  g_list_foreach (list, (GFunc)poppler_annot_mapping_free, nullptr);
   g_list_free (list);
 }
 
@@ -1547,7 +1547,7 @@ poppler_rectangle_new (void)
 PopplerRectangle *
 poppler_rectangle_copy (PopplerRectangle *rectangle)
 {
-  g_return_val_if_fail (rectangle != NULL, NULL);
+  g_return_val_if_fail (rectangle != nullptr, NULL);
 
   return g_slice_dup (PopplerRectangle, rectangle);
 }
@@ -1599,7 +1599,7 @@ poppler_point_new (void)
 PopplerPoint *
 poppler_point_copy (PopplerPoint *point)
 {
-  g_return_val_if_fail (point != NULL, NULL);
+  g_return_val_if_fail (point != nullptr, NULL);
 
   return g_slice_dup (PopplerPoint, point);
 }
@@ -1652,7 +1652,7 @@ poppler_quadrilateral_new (void)
 PopplerQuadrilateral *
 poppler_quadrilateral_copy (PopplerQuadrilateral *quad)
 {
-  g_return_val_if_fail (quad != NULL, NULL);
+  g_return_val_if_fail (quad != nullptr, NULL);
 
   return g_slice_dup (PopplerQuadrilateral, quad);
 }
@@ -2174,7 +2174,7 @@ poppler_page_get_text_layout_for_area (PopplerPage       *page,
   int n_lines;
 
   g_return_val_if_fail (POPPLER_IS_PAGE (page), FALSE);
-  g_return_val_if_fail (area != NULL, FALSE);
+  g_return_val_if_fail (area != nullptr, FALSE);
 
   *n_rectangles = 0;
 
@@ -2274,10 +2274,10 @@ poppler_page_get_text_layout_for_area (PopplerPage       *page,
 void
 poppler_page_free_text_attributes (GList *list)
 {
-  if (G_UNLIKELY (list == NULL))
+  if (G_UNLIKELY (list == nullptr))
     return;
 
-  g_list_foreach (list, (GFunc)poppler_text_attributes_free, NULL);
+  g_list_foreach (list, (GFunc)poppler_text_attributes_free, nullptr);
   g_list_free (list);
 }
 
@@ -2353,15 +2353,15 @@ poppler_page_get_text_attributes_for_area (PopplerPage      *page,
   PDFRectangle selection;
   GooList **word_list;
   int n_lines;
-  PopplerTextAttributes *attrs = NULL;
-  TextWord *word, *prev_word = NULL;
+  PopplerTextAttributes *attrs = nullptr;
+  TextWord *word, *prev_word = nullptr;
   gint word_i, prev_word_i;
   gint i, j;
   gint offset = 0;
-  GList *attributes = NULL;
+  GList *attributes = nullptr;
 
   g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL);
-  g_return_val_if_fail (area != NULL, FALSE);
+  g_return_val_if_fail (area != nullptr, FALSE);
 
   selection.x1 = area->x1;
   selection.y1 = area->y1;
@@ -2371,7 +2371,7 @@ poppler_page_get_text_attributes_for_area (PopplerPage      *page,
   text = poppler_page_get_text_page (page);
   word_list = text->getSelectionWords (&selection, selectionStyleGlyph, &n_lines);
   if (!word_list)
-          return NULL;
+          return nullptr;
 
   for (i = 0; i < n_lines; i++)
     {
diff --git a/glib/poppler-structure-element.cc b/glib/poppler-structure-element.cc
index e26f4c47..c7383c84 100644
--- a/glib/poppler-structure-element.cc
+++ b/glib/poppler-structure-element.cc
@@ -59,7 +59,7 @@ _poppler_structure_element_new (PopplerDocument *document, StructElement *elemen
   g_assert (POPPLER_IS_DOCUMENT (document));
   g_assert (element);
 
-  poppler_structure_element = (PopplerStructureElement *) g_object_new (POPPLER_TYPE_STRUCTURE_ELEMENT, NULL, NULL);
+  poppler_structure_element = (PopplerStructureElement *) g_object_new (POPPLER_TYPE_STRUCTURE_ELEMENT, nullptr, NULL);
   poppler_structure_element->document = (PopplerDocument *) g_object_ref (document);
   poppler_structure_element->elem = element;
 
@@ -105,7 +105,7 @@ PopplerStructureElementKind
 poppler_structure_element_get_kind (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), POPPLER_STRUCTURE_ELEMENT_CONTENT);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, POPPLER_STRUCTURE_ELEMENT_CONTENT);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, POPPLER_STRUCTURE_ELEMENT_CONTENT);
 
   switch (poppler_structure_element->elem->getType ())
     {
@@ -242,7 +242,7 @@ ENUM_VALUES (PopplerStructurePlacement, Placement)
   { "Before", POPPLER_STRUCTURE_PLACEMENT_BEFORE },
   { "Start",  POPPLER_STRUCTURE_PLACEMENT_START  },
   { "End",    POPPLER_STRUCTURE_PLACEMENT_END    },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureWritingMode, WritingMode)
@@ -250,7 +250,7 @@ ENUM_VALUES (PopplerStructureWritingMode, WritingMode)
   { "LrTb", POPPLER_STRUCTURE_WRITING_MODE_LR_TB },
   { "RlTb", POPPLER_STRUCTURE_WRITING_MODE_RL_TB },
   { "TbRl", POPPLER_STRUCTURE_WRITING_MODE_TB_RL },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle)
@@ -264,7 +264,7 @@ ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle)
   { "Groove", POPPLER_STRUCTURE_BORDER_STYLE_GROOVE },
   { "Inset",  POPPLER_STRUCTURE_BORDER_STYLE_INSET  },
   { "Outset", POPPLER_STRUCTURE_BORDER_STYLE_OUTSET },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureTextAlign, TextAlign)
@@ -273,7 +273,7 @@ ENUM_VALUES (PopplerStructureTextAlign, TextAlign)
   { "Center",  POPPLER_STRUCTURE_TEXT_ALIGN_CENTER  },
   { "End",     POPPLER_STRUCTURE_TEXT_ALIGN_END     },
   { "Justify", POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign)
@@ -282,7 +282,7 @@ ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign)
   { "Middle",  POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE  },
   { "After",   POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER   },
   { "Justify", POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign)
@@ -290,7 +290,7 @@ ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign)
   { "Start",  POPPLER_STRUCTURE_INLINE_ALIGN_START  },
   { "Center", POPPLER_STRUCTURE_INLINE_ALIGN_CENTER },
   { "End",    POPPLER_STRUCTURE_INLINE_ALIGN_END    },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType)
@@ -299,7 +299,7 @@ ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType)
   { "Underline",   POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE   },
   { "Overline",    POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE    },
   { "LineThrough", POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign)
@@ -309,7 +309,7 @@ ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign)
   { "End",        POPPLER_STRUCTURE_RUBY_ALIGN_END        },
   { "Justify",    POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY    },
   { "Distribute", POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition)
@@ -318,7 +318,7 @@ ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition)
   { "After",   POPPLER_STRUCTURE_RUBY_POSITION_AFTER   },
   { "Warichu", POPPLER_STRUCTURE_RUBY_POSITION_WARICHU },
   { "Inline",  POPPLER_STRUCTURE_RUBY_POSITION_INLINE  },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureGlyphOrientation, GlyphOrientationVertical)
@@ -330,7 +330,7 @@ ENUM_VALUES (PopplerStructureGlyphOrientation, GlyphOrientationVertical)
   { "360",  POPPLER_STRUCTURE_GLYPH_ORIENTATION_0    },
   { "-90",  POPPLER_STRUCTURE_GLYPH_ORIENTATION_270  },
   { "-180", POPPLER_STRUCTURE_GLYPH_ORIENTATION_180  },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureListNumbering, ListNumbering)
@@ -344,7 +344,7 @@ ENUM_VALUES (PopplerStructureListNumbering, ListNumbering)
   { "LowerRoman", POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN },
   { "UpperAlpha", POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA },
   { "LowerAlpha", POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureFormRole, Role)
@@ -353,7 +353,7 @@ ENUM_VALUES (PopplerStructureFormRole, Role)
   { "cb", POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX     },
   { "pb", POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON  },
   { "tv", POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE   },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureFormState, checked)
@@ -361,7 +361,7 @@ ENUM_VALUES (PopplerStructureFormState, checked)
   { "on",      POPPLER_STRUCTURE_FORM_STATE_ON      },
   { "off",     POPPLER_STRUCTURE_FORM_STATE_OFF     },
   { "neutral", POPPLER_STRUCTURE_FORM_STATE_NEUTRAL },
-  { NULL }
+  { nullptr }
 };
 
 ENUM_VALUES (PopplerStructureTableScope, Scope)
@@ -369,7 +369,7 @@ ENUM_VALUES (PopplerStructureTableScope, Scope)
   { "Row",    POPPLER_STRUCTURE_TABLE_SCOPE_ROW    },
   { "Column", POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN },
   { "Both",   POPPLER_STRUCTURE_TABLE_SCOPE_BOTH   },
-  { NULL }
+  { nullptr }
 };
 
 #undef ENUM_VALUES
@@ -383,7 +383,7 @@ name_to_enum (Object *name_value)
    * Non-NULL names must always be valid because Poppler
    * discards the invalid attributes when parsing them.
    */
-  g_assert (name_value != NULL);
+  g_assert (name_value != nullptr);
 
   for (const EnumNameValue<EnumType> *item = EnumNameValue<EnumType>::values ; item->name; item++)
     if (name_value->isName (item->name))
@@ -400,7 +400,7 @@ attr_to_enum (PopplerStructureElement *poppler_structure_element)
 {
   const Attribute *attr =
       poppler_structure_element->elem->findAttribute (EnumNameValue<EnumType>::attribute_type, gTrue);
-  return name_to_enum<EnumType> ((attr != NULL)
+  return name_to_enum<EnumType> ((attr != nullptr)
                                  ? attr->getValue ()
                                  : Attribute::getDefaultValue (EnumNameValue<EnumType>::attribute_type));
 }
@@ -431,7 +431,7 @@ gint
 poppler_structure_element_get_page (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), -1);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, -1);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, -1);
 
   Ref ref;
   if (poppler_structure_element->elem->getPageRef (ref))
@@ -456,7 +456,7 @@ gboolean
 poppler_structure_element_is_content (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, FALSE);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, FALSE);
 
   return poppler_structure_element->elem->isContent ();
 }
@@ -475,7 +475,7 @@ gboolean
 poppler_structure_element_is_inline (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, FALSE);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, FALSE);
 
   return poppler_structure_element->elem->isInline ();
 }
@@ -494,7 +494,7 @@ gboolean
 poppler_structure_element_is_block (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, FALSE);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, FALSE);
 
   return poppler_structure_element->elem->isBlock ();
 }
@@ -514,7 +514,7 @@ gboolean
 poppler_structure_element_is_grouping (PopplerStructureElement *poppler_structure_element)
 {
     g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-    g_return_val_if_fail (poppler_structure_element->elem != NULL, FALSE);
+    g_return_val_if_fail (poppler_structure_element->elem != nullptr, FALSE);
 
     return poppler_structure_element->elem->isGrouping ();
 }
@@ -534,10 +534,10 @@ gchar *
 poppler_structure_element_get_id (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   GooString *string = poppler_structure_element->elem->getID ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -554,10 +554,10 @@ gchar *
 poppler_structure_element_get_title (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   GooString *string = poppler_structure_element->elem->getTitle ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -577,13 +577,13 @@ gchar *
 poppler_structure_element_get_abbreviation (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   if (poppler_structure_element->elem->getType () != StructElement::Span)
-    return NULL;
+    return nullptr;
 
   GooString *string = poppler_structure_element->elem->getExpandedAbbr ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -602,10 +602,10 @@ gchar *
 poppler_structure_element_get_language (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   GooString *string = poppler_structure_element->elem->getLanguage ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -628,10 +628,10 @@ gchar *
 poppler_structure_element_get_alt_text (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   GooString *string = poppler_structure_element->elem->getAltText ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -656,10 +656,10 @@ gchar *
 poppler_structure_element_get_actual_text (PopplerStructureElement *poppler_structure_element)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   GooString *string = poppler_structure_element->elem->getActualText ();
-  return string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  return string ? _poppler_goo_string_to_utf8 (string) : nullptr;
 }
 
 /**
@@ -680,12 +680,12 @@ poppler_structure_element_get_text (PopplerStructureElement     *poppler_structu
                                     PopplerStructureGetTextFlags flags)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
 
   GooString *string =
       poppler_structure_element->elem->getText (flags & POPPLER_STRUCTURE_GET_TEXT_RECURSIVE);
-  gchar *result = string ? _poppler_goo_string_to_utf8 (string) : NULL;
+  gchar *result = string ? _poppler_goo_string_to_utf8 (string) : nullptr;
   delete string;
   return result;
 }
@@ -722,7 +722,7 @@ poppler_structure_element_iter_copy (PopplerStructureElementIter *iter)
 {
   PopplerStructureElementIter *new_iter;
 
-  g_return_val_if_fail (iter != NULL, NULL);
+  g_return_val_if_fail (iter != nullptr, NULL);
 
   new_iter = g_slice_dup (PopplerStructureElementIter, iter);
   new_iter->document = (PopplerDocument *) g_object_ref (new_iter->document);
@@ -741,7 +741,7 @@ poppler_structure_element_iter_copy (PopplerStructureElementIter *iter)
 void
 poppler_structure_element_iter_free (PopplerStructureElementIter *iter)
 {
-  if (G_UNLIKELY (iter == NULL))
+  if (G_UNLIKELY (iter == nullptr))
     return;
 
   g_object_unref (iter->document);
@@ -796,11 +796,11 @@ poppler_structure_element_iter_new (PopplerDocument *poppler_document)
   g_return_val_if_fail (POPPLER_IS_DOCUMENT (poppler_document), NULL);
 
   root = poppler_document->doc->getStructTreeRoot ();
-  if (root == NULL)
-    return NULL;
+  if (root == nullptr)
+    return nullptr;
 
   if (root->getNumChildren () == 0)
-    return NULL;
+    return nullptr;
 
   iter = g_slice_new0 (PopplerStructureElementIter);
   iter->document = (PopplerDocument *) g_object_ref (poppler_document);
@@ -827,7 +827,7 @@ poppler_structure_element_iter_next (PopplerStructureElementIter *iter)
 {
   unsigned elements;
 
-  g_return_val_if_fail (iter != NULL, FALSE);
+  g_return_val_if_fail (iter != nullptr, FALSE);
 
   elements = iter->is_root
     ? iter->root->getNumChildren ()
@@ -851,7 +851,7 @@ poppler_structure_element_iter_get_element (PopplerStructureElementIter *iter)
 {
   StructElement *elem;
 
-  g_return_val_if_fail (iter != NULL, NULL);
+  g_return_val_if_fail (iter != nullptr, NULL);
 
   elem = iter->is_root
     ? iter->root->getChild (iter->index)
@@ -877,7 +877,7 @@ poppler_structure_element_iter_get_child (PopplerStructureElementIter *parent)
 {
   StructElement *elem;
 
-  g_return_val_if_fail (parent != NULL, NULL);
+  g_return_val_if_fail (parent != nullptr, NULL);
 
   elem = parent->is_root
     ? parent->root->getChild (parent->index)
@@ -891,7 +891,7 @@ poppler_structure_element_iter_get_child (PopplerStructureElementIter *parent)
       return child;
     }
 
-  return NULL;
+  return nullptr;
 }
 
 
@@ -930,7 +930,7 @@ text_span_poppler_text_span (const TextSpan& span)
         // GfxFont sometimes does not have a family name but there
         // is always a font name that can be used as fallback.
         GooString *font_name = span.getFont ()->getFamily ();
-        if (font_name == NULL)
+        if (font_name == nullptr)
           font_name = span.getFont ()->getName ();
 
         new_span->font_name = _poppler_goo_string_to_utf8 (font_name);
@@ -975,7 +975,7 @@ poppler_text_span_copy (PopplerTextSpan *poppler_text_span)
 {
   PopplerTextSpan *new_span;
 
-  g_return_val_if_fail (poppler_text_span != NULL, NULL);
+  g_return_val_if_fail (poppler_text_span != nullptr, NULL);
 
   new_span = g_slice_dup (PopplerTextSpan, poppler_text_span);
   new_span->text = g_strdup (poppler_text_span->text);
@@ -995,7 +995,7 @@ poppler_text_span_copy (PopplerTextSpan *poppler_text_span)
 void
 poppler_text_span_free (PopplerTextSpan *poppler_text_span)
 {
-  if (G_UNLIKELY (poppler_text_span == NULL))
+  if (G_UNLIKELY (poppler_text_span == nullptr))
     return;
 
   g_free (poppler_text_span->text);
@@ -1016,7 +1016,7 @@ poppler_text_span_free (PopplerTextSpan *poppler_text_span)
 gboolean
 poppler_text_span_is_fixed_width_font (PopplerTextSpan *poppler_text_span)
 {
-  g_return_val_if_fail (poppler_text_span != NULL, FALSE);
+  g_return_val_if_fail (poppler_text_span != nullptr, FALSE);
 
   return (poppler_text_span->flags & POPPLER_TEXT_SPAN_FIXED_WIDTH);
 }
@@ -1034,7 +1034,7 @@ poppler_text_span_is_fixed_width_font (PopplerTextSpan *poppler_text_span)
 gboolean
 poppler_text_span_is_serif_font (PopplerTextSpan *poppler_text_span)
 {
-  g_return_val_if_fail (poppler_text_span != NULL, FALSE);
+  g_return_val_if_fail (poppler_text_span != nullptr, FALSE);
 
   return (poppler_text_span->flags & POPPLER_TEXT_SPAN_SERIF);
 }
@@ -1052,7 +1052,7 @@ poppler_text_span_is_serif_font (PopplerTextSpan *poppler_text_span)
 gboolean
 poppler_text_span_is_bold_font (PopplerTextSpan *poppler_text_span)
 {
-  g_return_val_if_fail (poppler_text_span != NULL, FALSE);
+  g_return_val_if_fail (poppler_text_span != nullptr, FALSE);
 
   return (poppler_text_span->flags & POPPLER_TEXT_SPAN_BOLD);
 }
@@ -1070,8 +1070,8 @@ void
 poppler_text_span_get_color (PopplerTextSpan *poppler_text_span,
                              PopplerColor *color)
 {
-  g_return_if_fail (poppler_text_span != NULL);
-  g_return_if_fail (color != NULL);
+  g_return_if_fail (poppler_text_span != nullptr);
+  g_return_if_fail (color != nullptr);
 
   *color = poppler_text_span->color;
 }
@@ -1089,7 +1089,7 @@ poppler_text_span_get_color (PopplerTextSpan *poppler_text_span,
 const gchar *
 poppler_text_span_get_text (PopplerTextSpan *poppler_text_span)
 {
-  g_return_val_if_fail (poppler_text_span != NULL, NULL);
+  g_return_val_if_fail (poppler_text_span != nullptr, NULL);
 
   return poppler_text_span->text;
 }
@@ -1108,7 +1108,7 @@ poppler_text_span_get_text (PopplerTextSpan *poppler_text_span)
 const gchar *
 poppler_text_span_get_font_name (PopplerTextSpan *poppler_text_span)
 {
-  g_return_val_if_fail (poppler_text_span != NULL, NULL);
+  g_return_val_if_fail (poppler_text_span != nullptr, NULL);
 
   return poppler_text_span->font_name;
 }
@@ -1144,11 +1144,11 @@ poppler_structure_element_get_text_spans (PopplerStructureElement *poppler_struc
                                           guint                   *n_text_spans)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
-  g_return_val_if_fail (n_text_spans != NULL, NULL);
-  g_return_val_if_fail (poppler_structure_element->elem != NULL, NULL);
+  g_return_val_if_fail (n_text_spans != nullptr, NULL);
+  g_return_val_if_fail (poppler_structure_element->elem != nullptr, NULL);
 
   if (!poppler_structure_element->elem->isContent ())
-    return NULL;
+    return nullptr;
 
   const TextSpanArray spans(poppler_structure_element->elem->getTextSpans ());
   PopplerTextSpan **text_spans = g_new0 (PopplerTextSpan*, spans.size ());
@@ -1205,8 +1205,8 @@ poppler_structure_element_get_writing_mode (PopplerStructureElement *poppler_str
 static void
 convert_border_style (Object *object, PopplerStructureBorderStyle *values)
 {
-  g_assert (object != NULL);
-  g_assert (values != NULL);
+  g_assert (object != nullptr);
+  g_assert (values != nullptr);
 
   if (object->isArray ())
     {
@@ -1241,7 +1241,7 @@ poppler_structure_element_get_border_style (PopplerStructureElement     *poppler
                                             PopplerStructureBorderStyle *border_styles)
 {
   g_return_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element));
-  g_return_if_fail (border_styles != NULL);
+  g_return_if_fail (border_styles != nullptr);
 
   convert_border_style (attr_value_or_default (poppler_structure_element,
                                                Attribute::BorderStyle),
@@ -1252,8 +1252,8 @@ static inline void
 convert_doubles_array (Object *object, gdouble **values, guint *n_values)
 {
   g_assert (object->isArray ());
-  g_assert (n_values != NULL);
-  g_assert (values != NULL);
+  g_assert (n_values != nullptr);
+  g_assert (values != nullptr);
 
   *n_values = object->arrayGetLength ();
   gdouble* doubles = g_new (gdouble, *n_values);
@@ -1267,7 +1267,7 @@ convert_doubles_array (Object *object, gdouble **values, guint *n_values)
 static inline void
 convert_color (Object *object, PopplerColor *color)
 {
-  g_assert (color != NULL);
+  g_assert (color != nullptr);
   g_assert (object->isArray () && object->arrayGetLength () != 3);
 
   color->red = object->arrayGet (0).getNum () * 65535;
@@ -1294,10 +1294,10 @@ poppler_structure_element_get_color (PopplerStructureElement *poppler_structure_
                                      PopplerColor            *color)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (color != NULL, FALSE);
+  g_return_val_if_fail (color != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::Color);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   convert_color (value, color);
@@ -1322,10 +1322,10 @@ poppler_structure_element_get_background_color (PopplerStructureElement *poppler
                                                 PopplerColor            *color)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (color != NULL, FALSE);
+  g_return_val_if_fail (color != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::BackgroundColor);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   convert_color (value, color);
@@ -1355,10 +1355,10 @@ poppler_structure_element_get_border_color (PopplerStructureElement *poppler_str
                                             PopplerColor            *colors)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (colors != NULL, FALSE);
+  g_return_val_if_fail (colors != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::BorderColor);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   g_assert (value->isArray ());
@@ -1385,7 +1385,7 @@ poppler_structure_element_get_border_color (PopplerStructureElement *poppler_str
 static inline void
 convert_double_or_4_doubles (Object *object, gdouble *value)
 {
-  g_assert (object != NULL);
+  g_assert (object != nullptr);
 
   if (object->isArray ())
     {
@@ -1423,10 +1423,10 @@ poppler_structure_element_get_border_thickness (PopplerStructureElement *poppler
                                                 gdouble                 *border_thicknesses)
 {
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
-  g_return_val_if_fail (border_thicknesses != NULL, FALSE);
+  g_return_val_if_fail (border_thicknesses != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::BorderThickness);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   convert_double_or_4_doubles (value, border_thicknesses);
@@ -1450,7 +1450,7 @@ poppler_structure_element_get_padding (PopplerStructureElement *poppler_structur
                                        gdouble                 *paddings)
 {
   g_return_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element));
-  g_return_if_fail (paddings != NULL);
+  g_return_if_fail (paddings != nullptr);
 
   convert_double_or_4_doubles (attr_value_or_default (poppler_structure_element,
                                                       Attribute::Padding),
@@ -1580,10 +1580,10 @@ poppler_structure_element_get_bounding_box (PopplerStructureElement *poppler_str
                                             PopplerRectangle        *bounding_box)
 {
   g_return_val_if_fail (poppler_structure_element_is_block (poppler_structure_element), FALSE);
-  g_return_val_if_fail (bounding_box != NULL, FALSE);
+  g_return_val_if_fail (bounding_box != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::BBox);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   gdouble dimensions[4];
@@ -1690,7 +1690,7 @@ poppler_structure_element_get_table_border_style (PopplerStructureElement     *p
                                                   PopplerStructureBorderStyle *border_styles)
 {
   g_return_if_fail (poppler_structure_element_is_block (poppler_structure_element));
-  g_return_if_fail (border_styles != NULL);
+  g_return_if_fail (border_styles != nullptr);
 
   convert_border_style (attr_value_or_default (poppler_structure_element,
                                                Attribute::TBorderStyle),
@@ -1715,7 +1715,7 @@ poppler_structure_element_get_table_padding (PopplerStructureElement *poppler_st
                                              gdouble                 *paddings)
 {
   g_return_if_fail (poppler_structure_element_is_block (poppler_structure_element));
-  g_return_if_fail (paddings != NULL);
+  g_return_if_fail (paddings != nullptr);
 
   convert_double_or_4_doubles (attr_value_or_default (poppler_structure_element,
                                                       Attribute::TPadding),
@@ -1783,10 +1783,10 @@ poppler_structure_element_get_text_decoration_color (PopplerStructureElement *po
                                                      PopplerColor            *color)
 {
   g_return_val_if_fail (poppler_structure_element_is_inline (poppler_structure_element), FALSE);
-  g_return_val_if_fail (color != NULL, FALSE);
+  g_return_val_if_fail (color != nullptr, FALSE);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::TextDecorationColor);
-  if (value == NULL)
+  if (value == nullptr)
     return FALSE;
 
   convert_color (value, color);
@@ -1812,7 +1812,7 @@ poppler_structure_element_get_text_decoration_thickness (PopplerStructureElement
   g_return_val_if_fail (poppler_structure_element_is_inline (poppler_structure_element), NAN);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::TextDecorationThickness);
-  return (value == NULL) ? NAN : value->getNum ();
+  return (value == nullptr) ? NAN : value->getNum ();
 }
 
 /**
@@ -1941,16 +1941,16 @@ poppler_structure_element_get_column_gaps (PopplerStructureElement *poppler_stru
                                            guint                   *n_values)
 {
   g_return_val_if_fail (poppler_structure_element_is_grouping (poppler_structure_element), NULL);
-  g_return_val_if_fail (n_values != NULL, NULL);
+  g_return_val_if_fail (n_values != nullptr, NULL);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::ColumnGap);
-  if (value == NULL)
+  if (value == nullptr)
     {
       *n_values = static_cast<guint> (-1);
-      return NULL;
+      return nullptr;
     }
 
-  gdouble *result = NULL;
+  gdouble *result = nullptr;
   convert_doubles_array (value, &result, n_values);
   return result;
 }
@@ -1976,13 +1976,13 @@ poppler_structure_element_get_column_widths (PopplerStructureElement *poppler_st
                                              guint                   *n_values)
 {
   g_return_val_if_fail (poppler_structure_element_is_grouping (poppler_structure_element), NULL);
-  g_return_val_if_fail (n_values != NULL, NULL);
+  g_return_val_if_fail (n_values != nullptr, NULL);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::ColumnWidths);
-  if (value == NULL)
-    return NULL;
+  if (value == nullptr)
+    return nullptr;
 
-  gdouble *result = NULL;
+  gdouble *result = nullptr;
   convert_doubles_array (value, &result, n_values);
   return result;
 }
@@ -2031,7 +2031,7 @@ poppler_structure_element_get_form_role (PopplerStructureElement *poppler_struct
    * The Role attribute can actually be undefined.
    */
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::Role);
-  if (value == NULL)
+  if (value == nullptr)
     return POPPLER_STRUCTURE_FORM_ROLE_UNDEFINED;
 
   return name_to_enum<PopplerStructureFormRole> (value);
@@ -2080,15 +2080,15 @@ poppler_structure_element_get_form_description (PopplerStructureElement *poppler
   g_return_val_if_fail (poppler_structure_element_get_kind (poppler_structure_element) == POPPLER_STRUCTURE_ELEMENT_FORM, NULL);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::Desc);
-  if (value == NULL)
-    return NULL;
+  if (value == nullptr)
+    return nullptr;
   if (value->isString ())
     return _poppler_goo_string_to_utf8 (value->getString ());
   if (value->isName ())
     return g_strdup (value->getName ());
 
   g_assert_not_reached ();
-  return NULL;
+  return nullptr;
 }
 
 /* Table Attributes */
@@ -2152,8 +2152,8 @@ poppler_structure_element_get_table_headers (PopplerStructureElement *poppler_st
   g_return_val_if_fail (poppler_structure_element_get_kind (poppler_structure_element) == POPPLER_STRUCTURE_ELEMENT_TABLE, NULL);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::Headers);
-  if (value == NULL)
-    return NULL;
+  if (value == nullptr)
+    return nullptr;
 
   g_assert (value->isArray ());
 
@@ -2218,13 +2218,13 @@ poppler_structure_element_get_table_summary (PopplerStructureElement *poppler_st
   g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), NULL);
 
   Object *value = attr_value_or_default (poppler_structure_element, Attribute::Summary);
-  if (value == NULL)
-    return NULL;
+  if (value == nullptr)
+    return nullptr;
   if (value->isString ())
     return _poppler_goo_string_to_utf8 (value->getString ());
   if (value->isName ())
     return g_strdup (value->getName ());
 
   g_assert_not_reached ();
-  return NULL;
+  return nullptr;
 }
diff --git a/glib/poppler.cc b/glib/poppler.cc
index abb634ff..0094c38a 100644
--- a/glib/poppler.cc
+++ b/glib/poppler.cc
@@ -92,10 +92,10 @@ error_cb (void *data G_GNUC_UNUSED,
   static const char * const cat_str[] = {
     "Syntax warning",
     "Syntax error",
-    NULL,
-    NULL,
+    nullptr,
+    nullptr,
     "IO error",
-    NULL,
+    nullptr,
     "Unimplemented feature",
     "Internal error"
   };
@@ -114,7 +114,7 @@ error_cb (void *data G_GNUC_UNUSED,
 static void __attribute__((__constructor__))
 poppler_constructor (void)
 {
-  setErrorCallback (error_cb, NULL);
+  setErrorCallback (error_cb, nullptr);
 }
 
 #endif /* GNUC */
diff --git a/goo/GooHash.cc b/goo/GooHash.cc
index 49f58c5f..cd39a5ae 100644
--- a/goo/GooHash.cc
+++ b/goo/GooHash.cc
@@ -56,7 +56,7 @@ GooHash::GooHash(GBool deleteKeysA) {
   size = 7;
   tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
   for (h = 0; h < size; ++h) {
-    tab[h] = NULL;
+    tab[h] = nullptr;
   }
   len = 0;
 }
@@ -149,7 +149,7 @@ void *GooHash::lookup(GooString *key) {
   int h;
 
   if (!(p = find(key, &h))) {
-    return NULL;
+    return nullptr;
   }
   return p->val.p;
 }
@@ -169,7 +169,7 @@ void *GooHash::lookup(const char *key) {
   int h;
 
   if (!(p = find(key, &h))) {
-    return NULL;
+    return nullptr;
   }
   return p->val.p;
 }
@@ -191,7 +191,7 @@ void *GooHash::remove(GooString *key) {
   int h;
 
   if (!(p = find(key, &h))) {
-    return NULL;
+    return nullptr;
   }
   q = &tab[h];
   while (*q != p) {
@@ -237,7 +237,7 @@ void *GooHash::remove(const char *key) {
   int h;
 
   if (!(p = find(key, &h))) {
-    return NULL;
+    return nullptr;
   }
   q = &tab[h];
   while (*q != p) {
@@ -279,7 +279,7 @@ int GooHash::removeInt(const char *key) {
 void GooHash::startIter(GooHashIter **iter) {
   *iter = new GooHashIter;
   (*iter)->h = -1;
-  (*iter)->p = NULL;
+  (*iter)->p = nullptr;
 }
 
 GBool GooHash::getNext(GooHashIter **iter, GooString **key, void **val) {
@@ -292,7 +292,7 @@ GBool GooHash::getNext(GooHashIter **iter, GooString **key, void **val) {
   while (!(*iter)->p) {
     if (++(*iter)->h == size) {
       delete *iter;
-      *iter = NULL;
+      *iter = nullptr;
       return gFalse;
     }
     (*iter)->p = tab[(*iter)->h];
@@ -312,7 +312,7 @@ GBool GooHash::getNext(GooHashIter **iter, GooString **key, int *val) {
   while (!(*iter)->p) {
     if (++(*iter)->h == size) {
       delete *iter;
-      *iter = NULL;
+      *iter = nullptr;
       return gFalse;
     }
     (*iter)->p = tab[(*iter)->h];
@@ -324,7 +324,7 @@ GBool GooHash::getNext(GooHashIter **iter, GooString **key, int *val) {
 
 void GooHash::killIter(GooHashIter **iter) {
   delete *iter;
-  *iter = NULL;
+  *iter = nullptr;
 }
 
 void GooHash::expand() {
@@ -337,7 +337,7 @@ void GooHash::expand() {
   size = 2*size + 1;
   tab = (GooHashBucket **)gmallocn(size, sizeof(GooHashBucket *));
   for (h = 0; h < size; ++h) {
-    tab[h] = NULL;
+    tab[h] = nullptr;
   }
   for (i = 0; i < oldSize; ++i) {
     while (oldTab[i]) {
@@ -363,7 +363,7 @@ GooHashBucket *GooHash::find(GooString *key, int *h) {
       return p;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 GooHashBucket *GooHash::find(const char *key, int *h) {
@@ -375,7 +375,7 @@ GooHashBucket *GooHash::find(const char *key, int *h) {
       return p;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 int GooHash::hash(GooString *key) {
diff --git a/goo/GooString.cc b/goo/GooString.cc
index e23c2b76..d67b8752 100644
--- a/goo/GooString.cc
+++ b/goo/GooString.cc
@@ -114,7 +114,7 @@ static const char *formatStrings[] = {
   "s",
   "t",
   "w",
-  NULL
+  nullptr
 };
 
 //------------------------------------------------------------------------
@@ -185,9 +185,9 @@ GooString* GooString::Set(const char *newStr, int newLen)
 }
 
 GooString::GooString() {
-  s = NULL;
+  s = nullptr;
   length = 0;
-  Set(NULL);
+  Set(nullptr);
 
 #if __cplusplus >= 201103L
   static_assert(sizeof(GooString) == GooString::STR_FINAL_SIZE, "You should check memory alignment or STR_STATIC_SIZE calculation.");
@@ -195,32 +195,32 @@ GooString::GooString() {
 }
 
 GooString::GooString(const char *sA) {
-  s = NULL;
+  s = nullptr;
   length = 0;
   Set(sA, CALC_STRING_LEN);
 }
 
 GooString::GooString(const char *sA, int lengthA) {
-  s = NULL;
+  s = nullptr;
   length = 0;
   Set(sA, lengthA);
 }
 
 GooString::GooString(GooString *str, int idx, int lengthA) {
-  s = NULL;
+  s = nullptr;
   length = 0;
   assert(idx + lengthA <= str->length);
   Set(str->getCString() + idx, lengthA);
 }
 
 GooString::GooString(const GooString *str) {
-  s = NULL;
+  s = nullptr;
   length = 0;
   Set(str->getCString(), str->length);
 }
 
 GooString::GooString(GooString *str1, GooString *str2) {
-  s = NULL;
+  s = nullptr;
   length = 0;
   resize(str1->length + str2->length);
   memcpy(s, str1->getCString(), str1->length);
diff --git a/goo/GooTimer.cc b/goo/GooTimer.cc
index c766c6bf..b1161853 100644
--- a/goo/GooTimer.cc
+++ b/goo/GooTimer.cc
@@ -32,7 +32,7 @@ GooTimer::GooTimer() {
 
 void GooTimer::start() {
 #ifdef HAVE_GETTIMEOFDAY
-  gettimeofday(&start_time, NULL);
+  gettimeofday(&start_time, nullptr);
 #elif defined(_WIN32)
   QueryPerformanceCounter(&start_time);
 #endif
@@ -41,7 +41,7 @@ void GooTimer::start() {
 
 void GooTimer::stop() {
 #ifdef HAVE_GETTIMEOFDAY
-  gettimeofday(&end_time, NULL);
+  gettimeofday(&end_time, nullptr);
 #elif defined(_WIN32)
   QueryPerformanceCounter(&end_time);
 #endif
@@ -55,7 +55,7 @@ double GooTimer::getElapsed()
   struct timeval elapsed;
 
   if (active)
-    gettimeofday(&end_time, NULL);
+    gettimeofday(&end_time, nullptr);
 
   if (start_time.tv_usec > end_time.tv_usec) {
       end_time.tv_usec += USEC_PER_SEC;
diff --git a/goo/PNGWriter.cc b/goo/PNGWriter.cc
index ed06edb3..f230fcaf 100644
--- a/goo/PNGWriter.cc
+++ b/goo/PNGWriter.cc
@@ -41,9 +41,9 @@ PNGWriter::PNGWriter(Format formatA)
 {
   priv = new PNGWriterPrivate;
   priv->format = formatA;
-  priv->icc_data = NULL;
+  priv->icc_data = nullptr;
   priv->icc_data_size = 0;
-  priv->icc_name = NULL;
+  priv->icc_name = nullptr;
   priv->sRGB_profile = false;
 }
 
@@ -82,7 +82,7 @@ bool PNGWriter::init(FILE *f, int width, int height, int hDPI, int vDPI)
 #endif
 
   /* initialize stuff */
-  priv->png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+  priv->png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
   if (!priv->png_ptr) {
     error(errInternal, -1, "png_create_write_struct failed");
     return false;
diff --git a/goo/TiffWriter.cc b/goo/TiffWriter.cc
index 35ceae69..fd2eaa31 100644
--- a/goo/TiffWriter.cc
+++ b/goo/TiffWriter.cc
@@ -42,10 +42,10 @@ TiffWriter::~TiffWriter()
 TiffWriter::TiffWriter(Format formatA)
 {
   priv = new TiffWriterPrivate;
-  priv->f = NULL;
+  priv->f = nullptr;
   priv->numRows = 0;
   priv->curRow = 0;
-  priv->compressionString = NULL;
+  priv->compressionString = nullptr;
   priv->format = formatA;
 }
 
@@ -87,12 +87,12 @@ bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDP
     { "dcs",	COMPRESSION_DCS,	"Kodak DCS encoding" },
     { "jbig",	COMPRESSION_JBIG,	"ISO JBIG" },
     { "jp2000",	COMPRESSION_JP2000,	"Leadtools JPEG2000" },
-    { NULL,	0,			NULL }
+    { nullptr,	0,			nullptr }
   };
 
   // Initialize
 
-  priv->f = NULL;
+  priv->f = nullptr;
   priv->curRow = 0;
 
   // Store the number of rows
@@ -103,20 +103,20 @@ bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDP
 
   compression = COMPRESSION_NONE;
 
-  if (priv->compressionString == NULL || strcmp(priv->compressionString, "") == 0) {
+  if (priv->compressionString == nullptr || strcmp(priv->compressionString, "") == 0) {
     compression = COMPRESSION_NONE;
   } else {
     int i;
-    for (i = 0; compressionList[i].compressionName != NULL; i++) {
+    for (i = 0; compressionList[i].compressionName != nullptr; i++) {
       if (strcmp(priv->compressionString, compressionList[i].compressionName) == 0) {
 	compression = compressionList[i].compressionCode;
 	break;
       }
     }
-    if (compressionList[i].compressionName == NULL) {
+    if (compressionList[i].compressionName == nullptr) {
       fprintf(stderr, "TiffWriter: Unknown compression type '%.10s', using 'none'.\n", priv->compressionString);
       fprintf(stderr, "Known compression types (the tiff library might not support every type)\n");
-      for (i = 0; compressionList[i].compressionName != NULL; i++) {
+      for (i = 0; compressionList[i].compressionName != nullptr; i++) {
 	fprintf(stderr, "%10s %s\n", compressionList[i].compressionName, compressionList[i].compressionDescription);
       }
     }
@@ -157,7 +157,7 @@ bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int vDP
 
   // Open the file
 
-  if (openedFile == NULL) {
+  if (openedFile == nullptr) {
     fprintf(stderr, "TiffWriter: No output file given.\n");
     return false;
   }
diff --git a/goo/gfile.cc b/goo/gfile.cc
index 8659440d..e19a1532 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -357,7 +357,7 @@ GBool openTempFile(GooString **name, FILE **f, const char *mode) {
   }
   s->appendf("x_{0:d}_{1:d}_",
 	     (int)GetCurrentProcessId(), (int)GetCurrentThreadId());
-  t = (int)time(NULL);
+  t = (int)time(nullptr);
   for (i = 0; i < 1000; ++i) {
     s2 = s->copy()->appendf("{0:d}", t + i);
     if (!(f2 = fopen(s2->getCString(), "r"))) {
@@ -416,7 +416,7 @@ GBool openTempFile(GooString **name, FILE **f, const char *mode) {
 #endif // HAVE_MKSTEMP
   if (fd < 0 || !(*f = fdopen(fd, mode))) {
     delete *name;
-    *name = NULL;
+    *name = nullptr;
     return gFalse;
   }
   return gTrue;
@@ -548,7 +548,7 @@ char *getLine(char *buf, int size, FILE *f) {
   }
   buf[i] = '\0';
   if (i == 0) {
-    return NULL;
+    return nullptr;
   }
   return buf;
 }
@@ -600,7 +600,7 @@ Goffset GoffsetMax() {
 #ifdef _WIN32
 
 GooFile::GooFile(HANDLE handleA) : handle(handleA) {
-  GetFileTime(handleA, NULL, NULL, &modifiedTimeOnOpen);
+  GetFileTime(handleA, nullptr, nullptr, &modifiedTimeOnOpen);
 }
 
 int GooFile::read(char *buf, int n, Goffset offset) const {
@@ -628,28 +628,28 @@ GooFile* GooFile::open(const GooString *fileName) {
   HANDLE handle = CreateFileA(fileName->getCString(),
                               GENERIC_READ,
                               FILE_SHARE_READ | FILE_SHARE_WRITE,
-                              NULL,
+                              nullptr,
                               OPEN_EXISTING,
-                              FILE_ATTRIBUTE_NORMAL, NULL);
+                              FILE_ATTRIBUTE_NORMAL, nullptr);
   
-  return handle == INVALID_HANDLE_VALUE ? NULL : new GooFile(handle);
+  return handle == INVALID_HANDLE_VALUE ? nullptr : new GooFile(handle);
 }
 
 GooFile* GooFile::open(const wchar_t *fileName) {
   HANDLE handle = CreateFileW(fileName,
                               GENERIC_READ,
                               FILE_SHARE_READ | FILE_SHARE_WRITE,
-                              NULL,
+                              nullptr,
                               OPEN_EXISTING,
-                              FILE_ATTRIBUTE_NORMAL, NULL);
+                              FILE_ATTRIBUTE_NORMAL, nullptr);
   
-  return handle == INVALID_HANDLE_VALUE ? NULL : new GooFile(handle);
+  return handle == INVALID_HANDLE_VALUE ? nullptr : new GooFile(handle);
 }
 
 bool GooFile::modificationTimeChangedSinceOpen() const
 {
   struct _FILETIME lastModified;
-  GetFileTime(handle, NULL, NULL, &lastModified);
+  GetFileTime(handle, nullptr, nullptr, &lastModified);
 
   return modifiedTimeOnOpen.dwHighDateTime != lastModified.dwHighDateTime || modifiedTimeOnOpen.dwLowDateTime != lastModified.dwLowDateTime;
 }
@@ -679,7 +679,7 @@ GooFile* GooFile::open(const GooString *fileName) {
   int fd = ::open(fileName->getCString(), O_RDONLY);
 #endif
   
-  return fd < 0 ? NULL : new GooFile(fd);
+  return fd < 0 ? nullptr : new GooFile(fd);
 }
 
 GooFile::GooFile(int fdA)
@@ -777,7 +777,7 @@ GDir::~GDir() {
 }
 
 GDirEntry *GDir::getNextEntry() {
-  GDirEntry *e = NULL;
+  GDirEntry *e = nullptr;
 
 #if defined(_WIN32)
   if (hnd != INVALID_HANDLE_VALUE) {
diff --git a/goo/gmem.cc b/goo/gmem.cc
index c1c607ac..574997fa 100644
--- a/goo/gmem.cc
+++ b/goo/gmem.cc
@@ -105,11 +105,11 @@ inline static void *gmalloc(size_t size, bool checkoverflow) {
   void *p;
 
   if (size == 0) {
-    return NULL;
+    return nullptr;
   }
   if (!(p = malloc(size))) {
     fprintf(stderr, "Out of memory\n");
-    if (checkoverflow) return NULL;
+    if (checkoverflow) return nullptr;
     else exit(1);
   }
   return p;
@@ -153,7 +153,7 @@ inline static void *grealloc(void *p, size_t size, bool checkoverflow) {
     if (p) {
       free(p);
     }
-    return NULL;
+    return nullptr;
   }
   if (p) {
     q = realloc(p, size);
@@ -162,7 +162,7 @@ inline static void *grealloc(void *p, size_t size, bool checkoverflow) {
   }
   if (!q) {
     fprintf(stderr, "Out of memory\n");
-    if (checkoverflow) return NULL;
+    if (checkoverflow) return nullptr;
     else exit(1);
   }
   return q;
@@ -181,12 +181,12 @@ inline static void *gmallocn(int nObjs, int objSize, bool checkoverflow) {
   int n;
 
   if (nObjs == 0) {
-    return NULL;
+    return nullptr;
   }
   n = nObjs * objSize;
   if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
     fprintf(stderr, "Bogus memory allocation size\n");
-    if (checkoverflow) return NULL;
+    if (checkoverflow) return nullptr;
     else exit(1);
   }
   return gmalloc(n, checkoverflow);
@@ -204,7 +204,7 @@ inline static void *gmallocn3(int a, int b, int c, bool checkoverflow) {
   int n = a * b;
   if (b <= 0 || a < 0 || a >= INT_MAX / b) {
     fprintf(stderr, "Bogus memory allocation size\n");
-    if (checkoverflow) return NULL;
+    if (checkoverflow) return nullptr;
     else exit(1);
   }
   return gmallocn(n, c, checkoverflow);
@@ -225,14 +225,14 @@ inline static void *greallocn(void *p, int nObjs, int objSize, bool checkoverflo
     if (p) {
       gfree(p);
     }
-    return NULL;
+    return nullptr;
   }
   n = nObjs * objSize;
   if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
     fprintf(stderr, "Bogus memory allocation size\n");
     if (checkoverflow) {
       gfree(p);
-      return NULL;
+      return nullptr;
     } else {
       exit(1);
     }
diff --git a/goo/grandom.cc b/goo/grandom.cc
index 12371754..3171af85 100644
--- a/goo/grandom.cc
+++ b/goo/grandom.cc
@@ -22,7 +22,7 @@ static unsigned int seed;
 
 static void initialize() {
   if (!initialized) {
-    seed = time(NULL);
+    seed = time(nullptr);
     initialized = gTrue;
   }
 }
@@ -49,7 +49,7 @@ static GBool initialized = gFalse;
 
 static void initialize() {
   if (!initialized) {
-    srand(time(NULL));
+    srand(time(nullptr));
     initialized = gTrue;
   }
 }
diff --git a/goo/gstrtod.cc b/goo/gstrtod.cc
index cd1d5b55..a1062821 100644
--- a/goo/gstrtod.cc
+++ b/goo/gstrtod.cc
@@ -34,7 +34,7 @@
   
 double gatof(const char *nptr)
 {
-  return gstrtod(nptr, NULL);
+  return gstrtod(nptr, nullptr);
 }
 
 double gstrtod(const char *nptr, char **endptr)
@@ -45,17 +45,17 @@ double gstrtod(const char *nptr, char **endptr)
   const char *decimal_point;
   int decimal_point_len;
   const char *p, *decimal_point_pos;
-  const char *end = NULL; /* Silence gcc */
+  const char *end = nullptr; /* Silence gcc */
   int strtod_errno;
 
-  fail_pos = NULL;
+  fail_pos = nullptr;
 
   locale_data = localeconv ();
   decimal_point = locale_data->decimal_point;
   decimal_point_len = strlen (decimal_point);
 
-  decimal_point_pos = NULL;
-  end = NULL;
+  decimal_point_pos = nullptr;
+  end = nullptr;
 
   if (decimal_point[0] != '.' || decimal_point[1] != 0) {
     p = nptr;
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 7f249d5a..373cddb2 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -114,7 +114,7 @@
 #define bezierCircle 0.55228475
 
 static AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) {
-  if (string != NULL) {
+  if (string != nullptr) {
     if (!string->cmp("Square")) {
       return annotLineEndingSquare;
     } else if (!string->cmp("Circle")) {
@@ -186,7 +186,7 @@ static AnnotExternalDataType parseAnnotExternalData(Dict* dict) {
 }
 
 static PDFRectangle *parseDiffRectangle(Array *array, PDFRectangle *rect) {
-  PDFRectangle *newRect = NULL;
+  PDFRectangle *newRect = nullptr;
   if (array->getLength() == 4) {
     // deltas
     Object obj1;
@@ -224,7 +224,7 @@ static LinkAction* getAdditionalAction(Annot::AdditionalActionsType type, Object
                        type == Annot::actionPageOpening ?   "PO" :
                        type == Annot::actionPageClosing ?   "PC" :
                        type == Annot::actionPageVisible ?   "PV" :
-                       type == Annot::actionPageInvisible ? "PI" : NULL);
+                       type == Annot::actionPageInvisible ? "PI" : nullptr);
 
     Object actionObject = additionalActionsObject.dictLookup(key);
     if (actionObject.isDict())
@@ -242,7 +242,7 @@ static LinkAction* getFormAdditionalAction(Annot::FormAdditionalActionsType type
     const char *key = (type == Annot::actionFieldModified ?  "K" :
                        type == Annot::actionFormatField ?    "F" :
                        type == Annot::actionValidateField ?  "V" :
-                       type == Annot::actionCalculateField ? "C" : NULL);
+                       type == Annot::actionCalculateField ? "C" : nullptr);
 
     Object actionObject = additionalActionsObject.dictLookup(key);
     if (actionObject.isDict())
@@ -284,12 +284,12 @@ AnnotBorderEffect::AnnotBorderEffect(Dict *dict) {
 //------------------------------------------------------------------------
 
 AnnotPath::AnnotPath() {
-  coords = NULL;
+  coords = nullptr;
   coordsLength = 0;
 }
 
 AnnotPath::AnnotPath(Array *array) {
-  coords = NULL;
+  coords = nullptr;
   coordsLength = 0;
   parsePathArray(array);
 }
@@ -322,7 +322,7 @@ double AnnotPath::getY(int coord) const {
 AnnotCoord *AnnotPath::getCoord(int coord) const {
   if (coord >= 0 && coord < coordsLength)
     return coords[coord];
-  return NULL;
+  return nullptr;
 }
 
 void AnnotPath::parsePathArray(Array *array) {
@@ -398,7 +398,7 @@ AnnotQuadrilaterals::AnnotQuadrilaterals(Array *array, PDFRectangle *rect) {
   double quadArray[8];
 
   // default values
-  quadrilaterals = NULL;
+  quadrilaterals = nullptr;
   quadrilateralsLength = 0;
 
   if ((arrayLength % 8) == 0) {
@@ -514,7 +514,7 @@ AnnotQuadrilaterals::AnnotQuadrilateral::AnnotQuadrilateral(double x1, double y1
 AnnotBorder::AnnotBorder() {
   width = 1;
   dashLength = 0;
-  dash = NULL;
+  dash = nullptr;
   style = borderSolid;
 }
 
@@ -892,7 +892,7 @@ Object AnnotAppearance::getAppearanceStream(AnnotAppearanceType type, const char
 }
 
 GooString * AnnotAppearance::getStateKey(int i) {
-  GooString * res = NULL;
+  GooString * res = nullptr;
   Object obj1 = appearDict.dictLookupNF("N");
   if (obj1.isDict())
     res = new GooString(obj1.dictGetKey(i));
@@ -1018,10 +1018,10 @@ AnnotAppearanceCharacs::AnnotAppearanceCharacs(Dict *dict) {
     if (colorComponents->getLength() > 0) {
       borderColor = new AnnotColor(colorComponents);
     } else {
-      borderColor = NULL;
+      borderColor = nullptr;
     }
   } else {
-    borderColor = NULL;
+    borderColor = nullptr;
   }
 
   obj1 = dict->lookup("BG");
@@ -1030,38 +1030,38 @@ AnnotAppearanceCharacs::AnnotAppearanceCharacs(Dict *dict) {
     if (colorComponents->getLength() > 0) {
       backColor = new AnnotColor(colorComponents);
     } else {
-      backColor = NULL;
+      backColor = nullptr;
     }
   } else {
-    backColor = NULL;
+    backColor = nullptr;
   }
 
   obj1 = dict->lookup("CA");
   if (obj1.isString()) {
     normalCaption = new GooString(obj1.getString());
   } else {
-    normalCaption = NULL;
+    normalCaption = nullptr;
   }
 
   obj1 = dict->lookup("RC");
   if (obj1.isString()) {
     rolloverCaption = new GooString(obj1.getString());
   } else {
-    rolloverCaption = NULL;
+    rolloverCaption = nullptr;
   }
 
   obj1 = dict->lookup("AC");
   if (obj1.isString()) {
     alternateCaption = new GooString(obj1.getString());
   } else {
-    alternateCaption = NULL;
+    alternateCaption = nullptr;
   }
 
   obj1 = dict->lookup("IF");
   if (obj1.isDict()) {
     iconFit = new AnnotIconFit(obj1.getDict());
   } else {
-    iconFit = NULL;
+    iconFit = nullptr;
   }
 
   obj1 = dict->lookup("TP");
@@ -1198,10 +1198,10 @@ void Annot::initialize(PDFDoc *docA, Dict *dict) {
   ok = gTrue;
   doc = docA;
   xref = doc->getXRef();
-  appearStreams = NULL;
-  appearBBox = NULL;
-  appearState = NULL;
-  appearBuf = NULL;
+  appearStreams = nullptr;
+  appearBBox = nullptr;
+  appearState = nullptr;
+  appearBuf = nullptr;
   fontSize = 0;
 
   appearance.setToNull();
@@ -1255,14 +1255,14 @@ void Annot::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isString()) {
     name = obj1.getString()->copy();
   } else {
-    name = NULL;
+    name = nullptr;
   }
 
   obj1 = dict->lookup("M");
   if (obj1.isString()) {
     modified = obj1.getString()->copy();
   } else {
-    modified = NULL;
+    modified = nullptr;
   }
 
   //----- get the flags
@@ -1310,13 +1310,13 @@ void Annot::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isArray())
     border = new AnnotBorderArray(obj1.getArray());
   else
-    border = NULL;
+    border = nullptr;
 
   obj1 = dict->lookup("C");
   if (obj1.isArray()) {
     color = new AnnotColor(obj1.getArray());
   } else {
-    color = NULL;
+    color = nullptr;
   }
 
   obj1 = dict->lookup("StructParent");
@@ -1380,7 +1380,7 @@ void Annot::update(const char *key, Object &&value) {
   /* Set M to current time, unless we are updating M itself */
   if (strcmp(key, "M") != 0) {
     delete modified;
-    modified = timeToDateString(NULL);
+    modified = timeToDateString(nullptr);
 
     annotObj.dictSet("M", Object(modified->copy()));
   }
@@ -1447,7 +1447,7 @@ void Annot::setBorder(AnnotBorder *new_border) {
     update(new_border->getType() == AnnotBorder::typeArray ? "Border" : "BS", std::move(obj1));
     border = new_border;
   } else {
-    border = NULL;
+    border = nullptr;
   }
   invalidateAppearance();
 }
@@ -1461,7 +1461,7 @@ void Annot::setColor(AnnotColor *new_color) {
     update ("C", std::move(obj1));
     color = new_color;
   } else {
-    color = NULL;
+    color = nullptr;
   }
   invalidateAppearance();
 }
@@ -1493,7 +1493,7 @@ void Annot::setAppearanceState(const char *state) {
   appearState = new GooString(state);
 
   delete appearBBox;
-  appearBBox = NULL;
+  appearBBox = nullptr;
 
   update ("AS", Object(objName, state));
 
@@ -1511,13 +1511,13 @@ void Annot::invalidateAppearance() {
     appearStreams->removeAllStreams();
   }
   delete appearStreams;
-  appearStreams = NULL;
+  appearStreams = nullptr;
 
   delete appearState;
-  appearState = NULL;
+  appearState = nullptr;
 
   delete appearBBox;
-  appearBBox = NULL;
+  appearBBox = nullptr;
 
   appearance.setToNull();
 
@@ -1811,7 +1811,7 @@ GBool Annot::isVisible(GBool printing) {
 int Annot::getRotation() const
 {
   Page *pageobj = doc->getPage(page);
-  assert(pageobj != NULL);
+  assert(pageobj != nullptr);
 
   if (flags & flagNoRotate) {
     return (360 - pageobj->getRotate()) % 360;
@@ -1827,7 +1827,7 @@ void Annot::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
       rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -1916,7 +1916,7 @@ void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
   if (obj1.isString()) {
     label = obj1.getString()->copy();
   } else {
-    label = NULL;
+    label = nullptr;
   }
 
   obj1 = dict->lookup("Popup");
@@ -1924,7 +1924,7 @@ void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
   if (obj1.isDict() && obj2.isRef()) {
     popup = new AnnotPopup(docA, &obj1, &obj2);
   } else {
-    popup = NULL;
+    popup = nullptr;
   }
 
   obj1 = dict->lookup("CA");
@@ -1938,7 +1938,7 @@ void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
   if (obj1.isString()) {
     date = obj1.getString()->copy();
   } else {
-    date = NULL;
+    date = nullptr;
   }
 
   obj1 = dict->lookupNF("IRT");
@@ -1953,7 +1953,7 @@ void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
   if (obj1.isString()) {
     subject = obj1.getString()->copy();
   } else {
-    subject = NULL;
+    subject = nullptr;
   }
 
   obj1 = dict->lookup("RT");
@@ -2000,7 +2000,7 @@ void AnnotMarkup::setPopup(AnnotPopup *new_popup) {
   // associated with a page, then we need to remove that
   // popup annotation from the page. Otherwise we would have
   // dangling references to it.
-  if (popup != NULL && popup->getPageNum() != 0) {
+  if (popup != nullptr && popup->getPageNum() != 0) {
     Page *pageobj = doc->getPage(popup->getPageNum());
     if (pageobj) {
       pageobj->removeAnnot(popup);
@@ -2019,12 +2019,12 @@ void AnnotMarkup::setPopup(AnnotPopup *new_popup) {
     // add the new popup annotation to the same page.
     if (page != 0) {
       Page *pageobj = doc->getPage(page);
-      assert(pageobj != NULL); // pageobj should exist in doc (see setPage())
+      assert(pageobj != nullptr); // pageobj should exist in doc (see setPage())
 
       pageobj->addAnnot(popup);
     }
   } else {
-    popup = NULL;
+    popup = nullptr;
   }
 }
 
@@ -2047,7 +2047,7 @@ void AnnotMarkup::setDate(GooString *new_date) {
 
 void AnnotMarkup::removeReferencedObjects() {
   Page *pageobj = doc->getPage(page);
-  assert(pageobj != NULL); // We're called when removing an annot from a page
+  assert(pageobj != nullptr); // We're called when removing an annot from a page
 
   // Remove popup
   if (popup) {
@@ -2478,7 +2478,7 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -2487,12 +2487,12 @@ void AnnotText::draw(Gfx *gfx, GBool printing) {
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
   if (appearBBox) {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    appearBBox->getPageXMin(), appearBBox->getPageYMin(),
                    appearBBox->getPageXMax(), appearBBox->getPageYMax(),
                    getRotation());
   } else {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   }
 }
@@ -2529,7 +2529,7 @@ AnnotLink::~AnnotLink() {
 void AnnotLink::initialize(PDFDoc *docA, Dict *dict) {
   Object obj1;
 
-  action = NULL;
+  action = nullptr;
 
   // look for destination
   obj1 = dict->lookup("Dest");
@@ -2574,7 +2574,7 @@ void AnnotLink::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isArray()) {
     quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect);
   } else {
-    quadrilaterals = NULL;
+    quadrilaterals = nullptr;
   }
 
   obj1 = dict->lookup("BS");
@@ -2657,7 +2657,7 @@ void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isString()) {
     styleString = obj1.getString()->copy();
   } else {
-    styleString = NULL;
+    styleString = nullptr;
   }
 
   obj1 = dict->lookup("CL");
@@ -2679,7 +2679,7 @@ void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) {
       calloutLine = new AnnotCalloutLine(x1, y1, x2, y2);
     }
   } else {
-    calloutLine = NULL;
+    calloutLine = nullptr;
   }
 
   obj1 = dict->lookup("IT");
@@ -2711,14 +2711,14 @@ void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isDict()) {
     borderEffect = new AnnotBorderEffect(obj1.getDict());
   } else {
-    borderEffect = NULL;
+    borderEffect = nullptr;
   }
 
   obj1 = dict->lookup("RD");
   if (obj1.isArray()) {
     rectangle = parseDiffRectangle(obj1.getArray(), rect);
   } else {
-    rectangle = NULL;
+    rectangle = nullptr;
   }
 
   obj1 = dict->lookup("LE");
@@ -2775,9 +2775,9 @@ void AnnotFreeText::setCalloutLine(AnnotCalloutLine *line) {
   delete calloutLine;
 
   Object obj1;
-  if (line == NULL) {
+  if (line == nullptr) {
     obj1.setToNull();
-    calloutLine = NULL;
+    calloutLine = nullptr;
   } else {
     double x1 = line->getX1(), y1 = line->getY1();
     double x2 = line->getX2(), y2 = line->getY2();
@@ -2834,7 +2834,7 @@ static GfxFont * createAnnotDrawFont(XRef * xref, Dict *fontResDict)
 
 void AnnotFreeText::parseAppearanceString(GooString *da, double &fontsize, AnnotColor* &fontcolor) {
   fontsize = -1;
-  fontcolor = NULL;
+  fontcolor = nullptr;
   if (da) {
     GooList * daToks = new GooList();
     int i = FormFieldText::tokenizeDA(da, daToks, "Tf");
@@ -2845,7 +2845,7 @@ void AnnotFreeText::parseAppearanceString(GooString *da, double &fontsize, Annot
     }
     // Scan backwards: we are looking for the last set value
     for (i = daToks->getLength()-1; i >= 0; --i) {
-      if (fontcolor == NULL) {
+      if (fontcolor == nullptr) {
         if (!((GooString *)daToks->get(i))->cmp("g") && i >= 1) {
           fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-1) )->getCString()));
         } else if (!((GooString *)daToks->get(i))->cmp("rg") && i >= 3) {
@@ -2886,7 +2886,7 @@ void AnnotFreeText::generateFreeTextAppearance()
   // Default values
   if (fontsize <= 0)
     fontsize = 10;
-  if (fontcolor == NULL)
+  if (fontcolor == nullptr)
     fontcolor = new AnnotColor(0, 0, 0); // Black
   if (!contents)
     contents = new GooString ();
@@ -2925,7 +2925,7 @@ void AnnotFreeText::generateFreeTextAppearance()
   while (i < contents->getLength()) {
     GooString out;
     double linewidth, xpos;
-    layoutText(contents, &out, &i, font, &linewidth, textwidth/fontsize, NULL, gFalse);
+    layoutText(contents, &out, &i, font, &linewidth, textwidth/fontsize, nullptr, gFalse);
     linewidth *= fontsize;
     switch (quadding) {
     case quaddingCentered:
@@ -2960,7 +2960,7 @@ void AnnotFreeText::generateFreeTextAppearance()
     delete appearBuf;
 
     appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
     appearance = createForm(bbox, gFalse, resDict);
   }
   delete appearBuf;
@@ -2977,7 +2977,7 @@ void AnnotFreeText::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                  rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -3065,7 +3065,7 @@ void AnnotLine::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isArray()) {
     interiorColor = new AnnotColor(obj1.getArray());
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
 
   obj1 = dict->lookup("LL");
@@ -3134,9 +3134,9 @@ void AnnotLine::initialize(PDFDoc *docA, Dict *dict) {
 
   obj1 = dict->lookup("Measure");
   if (obj1.isDict()) {
-    measure = NULL;
+    measure = nullptr;
   } else {
-    measure = NULL;
+    measure = nullptr;
   }
 
   obj1 = dict->lookup("CO");
@@ -3202,7 +3202,7 @@ void AnnotLine::setInteriorColor(AnnotColor *new_color) {
     update ("IC", std::move(obj1));
     interiorColor = new_color;
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
   invalidateAppearance();
 }
@@ -3289,7 +3289,7 @@ void AnnotLine::generateLineAppearance()
     while (i < contents->getLength()) {
       GooString out;
       double linewidth;
-      layoutText(contents, &out, &i, font, &linewidth, 0, NULL, gFalse);
+      layoutText(contents, &out, &i, font, &linewidth, 0, nullptr, gFalse);
       linewidth *= fontsize;
       if (linewidth > captionwidth) {
         captionwidth = linewidth;
@@ -3303,7 +3303,7 @@ void AnnotLine::generateLineAppearance()
     }
   } else {
     fontResDict = nullptr;
-    font = NULL;
+    font = nullptr;
   }
 
   // Draw main segment
@@ -3358,7 +3358,7 @@ void AnnotLine::generateLineAppearance()
     while (i < contents->getLength()) {
       GooString out;
       double linewidth, xpos;
-      layoutText(contents, &out, &i, font, &linewidth, 0, NULL, gFalse);
+      layoutText(contents, &out, &i, font, &linewidth, 0, nullptr, gFalse);
       linewidth *= fontsize;
       xpos = (captionwidth - linewidth) / 2;
       appearBuf->appendf("{0:.2f} {1:.2f} Td\n", xpos - xposPrev, -fontsize);
@@ -3400,7 +3400,7 @@ void AnnotLine::generateLineAppearance()
     delete appearBuf;
 
     appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
     appearance = createForm(bbox, gFalse, resDict);
   }
   delete appearBuf;
@@ -3418,12 +3418,12 @@ void AnnotLine::draw(Gfx *gfx, GBool printing) {
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
   if (appearBBox) {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    appearBBox->getPageXMin(), appearBBox->getPageYMin(),
                    appearBBox->getPageXMax(), appearBBox->getPageYMax(),
                    getRotation());
   } else {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   }
 }
@@ -3500,7 +3500,7 @@ void AnnotTextMarkup::initialize(PDFDoc *docA, Dict *dict) {
     quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect);
   } else {
     error(errSyntaxError, -1, "Bad Annot Text Markup QuadPoints");
-    quadrilaterals = NULL;
+    quadrilaterals = nullptr;
     ok = gFalse;
   }
 }
@@ -3695,11 +3695,11 @@ void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) {
     bbox[1] = appearBBox->getPageYMin();
     bbox[2] = appearBBox->getPageXMax();
     bbox[3] = appearBBox->getPageYMax();
-    aStream = createForm(bbox, gTrue, NULL);
+    aStream = createForm(bbox, gTrue, nullptr);
     delete appearBuf;
 
     appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", 1, blendMultiply ? "Multiply" : NULL);
+    Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", 1, blendMultiply ? "Multiply" : nullptr);
     if (ca == 1) {
       appearance = createForm(bbox, gFalse, resDict);
     } else {
@@ -3707,7 +3707,7 @@ void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict2 = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict2 = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict2);
     }
     delete appearBuf;
@@ -3716,12 +3716,12 @@ void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) {
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
   if (appearBBox) {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    appearBBox->getPageXMin(), appearBBox->getPageYMin(),
                    appearBBox->getPageXMax(), appearBBox->getPageYMax(),
                    getRotation());
   } else {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   }
 }
@@ -3733,7 +3733,7 @@ void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) {
 AnnotWidget::AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj) :
     Annot(docA, dictObject, obj) {
   type = typeWidget;
-  field = NULL;
+  field = nullptr;
   initialize(docA, dictObject->getDict());
 }
 
@@ -3781,10 +3781,10 @@ void AnnotWidget::initialize(PDFDoc *docA, Dict *dict) {
   if (obj1.isDict()) {
     appearCharacs = new AnnotAppearanceCharacs(obj1.getDict());
   } else {
-    appearCharacs = NULL;
+    appearCharacs = nullptr;
   }
 
-  action = NULL;
+  action = nullptr;
   obj1 = dict->lookup("A");
   if (obj1.isDict()) {
     action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI());
@@ -3794,9 +3794,9 @@ void AnnotWidget::initialize(PDFDoc *docA, Dict *dict) {
 
   obj1 = dict->lookup("Parent");
   if (obj1.isDict()) {
-    parent = NULL;
+    parent = nullptr;
   } else {
-    parent = NULL;
+    parent = nullptr;
   }
 
   obj1 = dict->lookup("BS");
@@ -4008,13 +4008,13 @@ void Annot::layoutText(GooString *text, GooString *outBuf, int *i,
 
   // Compute the actual width and character count of the final string, based on
   // breakpoint, if this information is requested by the caller.
-  if (width != NULL || charCount != NULL) {
+  if (width != nullptr || charCount != nullptr) {
     char *s = outBuf->getCString();
     int len = outBuf->getLength();
 
-    if (width != NULL)
+    if (width != nullptr)
       *width = 0.0;
-    if (charCount != NULL)
+    if (charCount != nullptr)
       *charCount = 0;
 
     while (len > 0) {
@@ -4025,9 +4025,9 @@ void Annot::layoutText(GooString *text, GooString *outBuf, int *i,
         break;
       }
 
-      if (width != NULL)
+      if (width != nullptr)
         *width += dx;
-      if (charCount != NULL)
+      if (charCount != nullptr)
         *charCount += 1;
 
       s += n;
@@ -4104,7 +4104,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
       }
     }
   } else {
-    daToks = NULL;
+    daToks = nullptr;
   }
 
   // force ZapfDingbats
@@ -4118,7 +4118,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
     }
   }
   // get the font and font size
-  font = NULL;
+  font = nullptr;
   fontSize = 0;
   if (tfPos >= 0) {
     tok = (GooString *)daToks->get(tfPos);
@@ -4214,7 +4214,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
         y = dy - 3;
         i = 0;
         while (i < text->getLength()) {
-          layoutText(text, convertedText, &i, font, &w, wMax / fontSize, NULL,
+          layoutText(text, convertedText, &i, font, &w, wMax / fontSize, nullptr,
                      forceZapfDingbats);
           y -= fontSize;
         }
@@ -4261,7 +4261,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
     i = 0;
     xPrev = 0;
     while (i < text->getLength()) {
-      layoutText(text, convertedText, &i, font, &w, wMax / fontSize, NULL,
+      layoutText(text, convertedText, &i, font, &w, wMax / fontSize, nullptr,
                  forceZapfDingbats);
       w *= fontSize;
 
@@ -4314,7 +4314,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
       }
 
       i = 0;
-      layoutText(text, convertedText, &i, font, NULL, 0.0, &charCount,
+      layoutText(text, convertedText, &i, font, nullptr, 0.0, &charCount,
                  forceZapfDingbats);
       if (charCount > comb)
         charCount = comb;
@@ -4391,7 +4391,7 @@ void AnnotWidget::drawText(GooString *text, GooString *da, GfxResources *resourc
       // regular (non-comb) formatting
     } else {
       i = 0;
-      layoutText(text, convertedText, &i, font, &w, 0.0, NULL,
+      layoutText(text, convertedText, &i, font, &w, 0.0, nullptr,
                  forceZapfDingbats);
 
       // compute font autosize
@@ -4508,11 +4508,11 @@ void AnnotWidget::drawListBox(FormFieldChoice *fieldChoice,
       }
     }
   } else {
-    daToks = NULL;
+    daToks = nullptr;
   }
 
   // get the font and font size
-  font = NULL;
+  font = nullptr;
   fontSize = 0;
   if (tfPos >= 0) {
     tok = (GooString *)daToks->get(tfPos);
@@ -4545,7 +4545,7 @@ void AnnotWidget::drawListBox(FormFieldChoice *fieldChoice,
     wMax = 0;
     for (i = 0; i < fieldChoice->getNumChoices(); ++i) {
       j = 0;
-      if (fieldChoice->getChoice(i) == NULL) {
+      if (fieldChoice->getChoice(i) == nullptr) {
         error(errSyntaxError, -1, "Invalid annotation listbox");
         if (daToks) {
           deleteGooList(daToks, GooString);
@@ -4553,7 +4553,7 @@ void AnnotWidget::drawListBox(FormFieldChoice *fieldChoice,
         delete convertedText;
         return;
       }
-      layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, NULL, gFalse);
+      layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, nullptr, gFalse);
       if (w > wMax) {
         wMax = w;
       }
@@ -4591,7 +4591,7 @@ void AnnotWidget::drawListBox(FormFieldChoice *fieldChoice,
 
     // compute text width and start position
     j = 0;
-    layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, NULL, gFalse);
+    layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, nullptr, gFalse);
     w *= fontSize;
     switch (quadding) {
     case quaddingLeftJustified:
@@ -4668,7 +4668,7 @@ void AnnotWidget::drawBorder() {
   double dy = rect->y2 - rect->y1;
 
   // radio buttons with no caption have a round border
-  GBool hasCaption = appearCharacs->getNormalCaption() != NULL;
+  GBool hasCaption = appearCharacs->getNormalCaption() != nullptr;
   if (field->getType() == formButton &&
       static_cast<FormFieldButton*>(field)->getButtonType() == formButtonRadio && !hasCaption) {
     double r = 0.5 * (dx < dy ? dx : dy);
@@ -4757,7 +4757,7 @@ void AnnotWidget::drawBorder() {
 }
 
 void AnnotWidget::drawFormFieldButton(GfxResources *resources, GooString *da) {
-  GooString *caption = NULL;
+  GooString *caption = nullptr;
   if (appearCharacs)
     caption = appearCharacs->getNormalCaption();
 
@@ -4978,7 +4978,7 @@ void AnnotWidget::draw(Gfx *gfx, GBool printing) {
     gfx->pushResources(dict);
     delete dict;
   }
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
 		 rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   if (addDingbatsResource) {
     gfx->popResources();
@@ -5021,7 +5021,7 @@ void AnnotMovie::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isString()) {
     title = obj1.getString()->copy();
   } else {
-    title = NULL;
+    title = nullptr;
   }
 
   Object movieDict = dict->lookup("Movie");
@@ -5033,12 +5033,12 @@ void AnnotMovie::initialize(PDFDoc *docA, Dict* dict) {
       movie = new Movie (&movieDict);
     if (!movie->isOk()) {
       delete movie;
-      movie = NULL;
+      movie = nullptr;
       ok = gFalse;
     }
   } else {
     error(errSyntaxError, -1, "Bad Annot Movie");
-    movie = NULL;
+    movie = nullptr;
     ok = gFalse;
   }
 }
@@ -5118,7 +5118,7 @@ void AnnotMovie::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
 		 rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -5150,27 +5150,27 @@ AnnotScreen::~AnnotScreen() {
 void AnnotScreen::initialize(PDFDoc *docA, Dict* dict) {
   Object obj1;
 
-  title = NULL;
+  title = nullptr;
   obj1 = dict->lookup("T");
   if (obj1.isString()) {
     title = obj1.getString()->copy();
   }
 
-  action = NULL;
+  action = nullptr;
   obj1 = dict->lookup("A");
   if (obj1.isDict()) {
     action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI());
     if (action && action->getKind() == actionRendition && page == 0) {
       error (errSyntaxError, -1, "Invalid Rendition action: associated screen annotation without P");
       delete action;
-      action = NULL;
+      action = nullptr;
       ok = gFalse;
     }
   }
 
   additionalActions = dict->lookupNF("AA");
 
-  appearCharacs = NULL;
+  appearCharacs = nullptr;
   obj1 = dict->lookup("MK");
   if (obj1.isDict()) {
     appearCharacs = new AnnotAppearanceCharacs(obj1.getDict());
@@ -5180,7 +5180,7 @@ void AnnotScreen::initialize(PDFDoc *docA, Dict* dict) {
 LinkAction* AnnotScreen::getAdditionalAction(AdditionalActionsType type)
 {
   if (type == actionFocusIn || type == actionFocusOut) // not defined for screen annotation
-    return NULL;
+    return nullptr;
 
   return ::getAdditionalAction(type, &additionalActions, doc);
 }
@@ -5281,7 +5281,7 @@ void AnnotGeometry::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isArray()) {
     interiorColor = new AnnotColor(obj1.getArray());
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
 
   obj1 = dict->lookup("BS");
@@ -5296,10 +5296,10 @@ void AnnotGeometry::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isDict()) {
     borderEffect = new AnnotBorderEffect(obj1.getDict());
   } else {
-    borderEffect = NULL;
+    borderEffect = nullptr;
   }
 
-  geometryRect = NULL;
+  geometryRect = nullptr;
   obj1 = dict->lookup("RD");
   if (obj1.isArray()) {
     geometryRect = parseDiffRectangle(obj1.getArray(), rect);
@@ -5333,7 +5333,7 @@ void AnnotGeometry::setInteriorColor(AnnotColor *new_color) {
     update ("IC", std::move(obj1));
     interiorColor = new_color;
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
   invalidateAppearance();
 }
@@ -5430,7 +5430,7 @@ void AnnotGeometry::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -5438,7 +5438,7 @@ void AnnotGeometry::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
 		 rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -5530,7 +5530,7 @@ void AnnotPolygon::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isArray()) {
     interiorColor = new AnnotColor(obj1.getArray());
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
 
   obj1 = dict->lookup("BS");
@@ -5545,7 +5545,7 @@ void AnnotPolygon::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isDict()) {
     borderEffect = new AnnotBorderEffect(obj1.getDict());
   } else {
-    borderEffect = NULL;
+    borderEffect = nullptr;
   }
 
   obj1 = dict->lookup("IT");
@@ -5618,7 +5618,7 @@ void AnnotPolygon::setInteriorColor(AnnotColor *new_color) {
     update ("IC", std::move(obj1));
     interiorColor = new_color;
   } else {
-    interiorColor = NULL;
+    interiorColor = nullptr;
   }
   invalidateAppearance();
 }
@@ -5692,7 +5692,7 @@ void AnnotPolygon::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -5701,12 +5701,12 @@ void AnnotPolygon::draw(Gfx *gfx, GBool printing) {
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
   if (appearBBox) {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    appearBBox->getPageXMin(), appearBBox->getPageYMin(),
                    appearBBox->getPageXMax(), appearBBox->getPageYMax(),
                    getRotation());
   } else {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   }
 }
@@ -5752,7 +5752,7 @@ void AnnotCaret::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isArray()) {
     caretRect = parseDiffRectangle(obj1.getArray(), rect);
   } else {
-    caretRect = NULL;
+    caretRect = nullptr;
   }
 }
 
@@ -5803,7 +5803,7 @@ void AnnotInk::initialize(PDFDoc *docA, Dict* dict) {
     parseInkList(obj1.getArray());
   } else {
     inkListLength = 0;
-    inkList = NULL;
+    inkList = nullptr;
     error(errSyntaxError, -1, "Bad Annot Ink List");
     ok = gFalse;
   }
@@ -5906,7 +5906,7 @@ void AnnotInk::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -5915,12 +5915,12 @@ void AnnotInk::draw(Gfx *gfx, GBool printing) {
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
   if (appearBBox) {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    appearBBox->getPageXMin(), appearBBox->getPageYMin(),
                    appearBBox->getPageXMax(), appearBBox->getPageYMax(),
                    getRotation());
   } else {
-    gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+    gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
                    rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
   }
 }
@@ -6118,7 +6118,7 @@ void AnnotFileAttachment::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -6126,7 +6126,7 @@ void AnnotFileAttachment::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   Object obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
 		 rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -6271,7 +6271,7 @@ void AnnotSound::draw(Gfx *gfx, GBool printing) {
       delete appearBuf;
 
       appearBuf = new GooString ("/GS0 gs\n/Fm0 Do");
-      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, NULL);
+      Dict *resDict = createResourcesDict("Fm0", std::move(aStream), "GS0", ca, nullptr);
       appearance = createForm(bbox, gFalse, resDict);
     }
     delete appearBuf;
@@ -6279,7 +6279,7 @@ void AnnotSound::draw(Gfx *gfx, GBool printing) {
 
   // draw the appearance stream
   obj = appearance.fetch(gfx->getXRef());
-  gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color,
+  gfx->drawAnnot(&obj, (AnnotBorder *)nullptr, color,
 		 rect->x1, rect->y1, rect->x2, rect->y2, getRotation());
 }
 
@@ -6313,7 +6313,7 @@ void Annot3D::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isDict()) {
     activation = new Activation(obj1.getDict());
   } else {
-    activation = NULL;
+    activation = nullptr;
   }
 }
 
@@ -6431,14 +6431,14 @@ void AnnotRichMedia::initialize(PDFDoc *docA, Dict* dict) {
   if (obj1.isDict()) {
     content = new AnnotRichMedia::Content(obj1.getDict());
   } else {
-    content = NULL;
+    content = nullptr;
   }
 
   obj1 = dict->lookup("RichMediaSettings");
   if (obj1.isDict()) {
     settings = new AnnotRichMedia::Settings(obj1.getDict());
   } else {
-    settings = NULL;
+    settings = nullptr;
   }
 }
 
@@ -6455,14 +6455,14 @@ AnnotRichMedia::Settings::Settings(Dict *dict) {
   if (obj1.isDict()) {
     activation = new AnnotRichMedia::Activation(obj1.getDict());
   } else {
-    activation = NULL;
+    activation = nullptr;
   }
 
   obj1 = dict->lookup("Deactivation");
   if (obj1.isDict()) {
     deactivation = new AnnotRichMedia::Deactivation(obj1.getDict());
   } else {
-    deactivation = NULL;
+    deactivation = nullptr;
   }
 }
 
@@ -6537,16 +6537,16 @@ AnnotRichMedia::Content::Content(Dict *dict) {
       if (obj2.isDict()) {
         configurations[i] = new AnnotRichMedia::Configuration(obj2.getDict());
       } else {
-        configurations[i] = NULL;
+        configurations[i] = nullptr;
       }
     }
   } else {
     nConfigurations = 0;
-    configurations = NULL;
+    configurations = nullptr;
   }
 
   nAssets = 0;
-  assets = NULL;
+  assets = nullptr;
   obj1 = dict->lookup("Assets");
   if (obj1.isDict()) {
     Object obj2 = obj1.getDict()->lookup("Names");
@@ -6590,7 +6590,7 @@ int AnnotRichMedia::Content::getConfigurationsCount() const {
 
 AnnotRichMedia::Configuration* AnnotRichMedia::Content::getConfiguration(int index) const {
   if (index < 0 || index >= nConfigurations)
-    return NULL;
+    return nullptr;
 
   return configurations[index];
 }
@@ -6601,13 +6601,13 @@ int AnnotRichMedia::Content::getAssetsCount() const {
 
 AnnotRichMedia::Asset* AnnotRichMedia::Content::getAsset(int index) const {
   if (index < 0 || index >= nAssets)
-    return NULL;
+    return nullptr;
 
   return assets[index];
 }
 
 AnnotRichMedia::Asset::Asset()
-  : name(NULL)
+  : name(nullptr)
 {
 }
 
@@ -6637,18 +6637,18 @@ AnnotRichMedia::Configuration::Configuration(Dict *dict)
       if (obj2.isDict()) {
         instances[i] = new AnnotRichMedia::Instance(obj2.getDict());
       } else {
-        instances[i] = NULL;
+        instances[i] = nullptr;
       }
     }
   } else {
-    instances = NULL;
+    instances = nullptr;
   }
 
   obj1 = dict->lookup("Name");
   if (obj1.isString()) {
     name = new GooString(obj1.getString());
   } else {
-    name = NULL;
+    name = nullptr;
   }
 
   obj1 = dict->lookup("Subtype");
@@ -6710,7 +6710,7 @@ int AnnotRichMedia::Configuration::getInstancesCount() const {
 
 AnnotRichMedia::Instance* AnnotRichMedia::Configuration::getInstance(int index) const {
   if (index < 0 || index >= nInstances)
-    return NULL;
+    return nullptr;
 
   return instances[index];
 }
@@ -6744,7 +6744,7 @@ AnnotRichMedia::Instance::Instance(Dict *dict)
   if (obj1.isDict()) {
     params = new AnnotRichMedia::Params(obj1.getDict());
   } else {
-    params = NULL;
+    params = nullptr;
   }
 }
 
@@ -6767,7 +6767,7 @@ AnnotRichMedia::Params::Params(Dict *dict)
   if (obj1.isString()) {
     flashVars = new GooString(obj1.getString());
   } else {
-    flashVars = NULL;
+    flashVars = nullptr;
   }
 }
 
@@ -6789,7 +6789,7 @@ Annots::Annots(PDFDoc *docA, int page, Object *annotsObj) {
   int i;
 
   doc = docA;
-  annots = NULL;
+  annots = nullptr;
   size = 0;
   nAnnots = 0;
 
@@ -6920,7 +6920,7 @@ Annot *Annots::createAnnot(Object* dictObject, Object *obj) {
       if (obj2.isNull())
         annot = new AnnotPopup(doc, dictObject, obj);
       else
-        annot = NULL;
+        annot = nullptr;
     } else {
       annot = new Annot(doc, dictObject, obj);
     }
@@ -6937,7 +6937,7 @@ Annot *Annots::findAnnot(Ref *ref) {
       return annots[i];
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 
diff --git a/poppler/Array.cc b/poppler/Array.cc
index c6de53ef..3276349f 100644
--- a/poppler/Array.cc
+++ b/poppler/Array.cc
@@ -47,7 +47,7 @@
 
 Array::Array(XRef *xrefA) {
   xref = xrefA;
-  elems = NULL;
+  elems = nullptr;
   size = length = 0;
   ref = 1;
 #ifdef MULTITHREADED
diff --git a/poppler/BuiltinFont.cc b/poppler/BuiltinFont.cc
index 20a297d6..b6034752 100644
--- a/poppler/BuiltinFont.cc
+++ b/poppler/BuiltinFont.cc
@@ -26,7 +26,7 @@ BuiltinFontWidths::BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA) {
   size = sizeA;
   tab = (BuiltinFontWidth **)gmallocn(size, sizeof(BuiltinFontWidth *));
   for (i = 0; i < size; ++i) {
-    tab[i] = NULL;
+    tab[i] = nullptr;
   }
   for (i = 0; i < sizeA; ++i) {
     h = hash(widths[i].name);
diff --git a/poppler/BuiltinFontTables.cc b/poppler/BuiltinFontTables.cc
index 5115b7bc..c1e636f6 100644
--- a/poppler/BuiltinFontTables.cc
+++ b/poppler/BuiltinFontTables.cc
@@ -12,4235 +12,4235 @@
 #include "BuiltinFontTables.h"
 
 static BuiltinFontWidth courierWidthsTab[] = {
-  { "Ntilde",                            600, NULL },
-  { "rcaron",                            600, NULL },
-  { "kcommaaccent",                      600, NULL },
-  { "Ncommaaccent",                      600, NULL },
-  { "Zacute",                            600, NULL },
-  { "comma",                             600, NULL },
-  { "cedilla",                           600, NULL },
-  { "plusminus",                         600, NULL },
-  { "circumflex",                        600, NULL },
-  { "dotaccent",                         600, NULL },
-  { "edotaccent",                        600, NULL },
-  { "asciitilde",                        600, NULL },
-  { "colon",                             600, NULL },
-  { "onehalf",                           600, NULL },
-  { "dollar",                            600, NULL },
-  { "Lcaron",                            600, NULL },
-  { "ntilde",                            600, NULL },
-  { "Aogonek",                           600, NULL },
-  { "ncommaaccent",                      600, NULL },
-  { "minus",                             600, NULL },
-  { "Iogonek",                           600, NULL },
-  { "zacute",                            600, NULL },
-  { "yen",                               600, NULL },
-  { "space",                             600, NULL },
-  { "Omacron",                           600, NULL },
-  { "questiondown",                      600, NULL },
-  { "emdash",                            600, NULL },
-  { "Agrave",                            600, NULL },
-  { "three",                             600, NULL },
-  { "numbersign",                        600, NULL },
-  { "lcaron",                            600, NULL },
-  { "A",                                 600, NULL },
-  { "B",                                 600, NULL },
-  { "C",                                 600, NULL },
-  { "aogonek",                           600, NULL },
-  { "D",                                 600, NULL },
-  { "E",                                 600, NULL },
-  { "onequarter",                        600, NULL },
-  { "F",                                 600, NULL },
-  { "G",                                 600, NULL },
-  { "H",                                 600, NULL },
-  { "I",                                 600, NULL },
-  { "J",                                 600, NULL },
-  { "K",                                 600, NULL },
-  { "iogonek",                           600, NULL },
-  { "L",                                 600, NULL },
-  { "backslash",                         600, NULL },
-  { "periodcentered",                    600, NULL },
-  { "M",                                 600, NULL },
-  { "N",                                 600, NULL },
-  { "omacron",                           600, NULL },
-  { "Tcommaaccent",                      600, NULL },
-  { "O",                                 600, NULL },
-  { "P",                                 600, NULL },
-  { "Q",                                 600, NULL },
-  { "Uhungarumlaut",                     600, NULL },
-  { "R",                                 600, NULL },
-  { "Aacute",                            600, NULL },
-  { "caron",                             600, NULL },
-  { "S",                                 600, NULL },
-  { "T",                                 600, NULL },
-  { "U",                                 600, NULL },
-  { "agrave",                            600, NULL },
-  { "V",                                 600, NULL },
-  { "W",                                 600, NULL },
-  { "equal",                             600, NULL },
-  { "question",                          600, NULL },
-  { "X",                                 600, NULL },
-  { "Y",                                 600, NULL },
-  { "Z",                                 600, NULL },
-  { "four",                              600, NULL },
-  { "a",                                 600, NULL },
-  { "Gcommaaccent",                      600, NULL },
-  { "b",                                 600, NULL },
-  { "c",                                 600, NULL },
-  { "d",                                 600, NULL },
-  { "e",                                 600, NULL },
-  { "f",                                 600, NULL },
-  { "g",                                 600, NULL },
-  { "bullet",                            600, NULL },
-  { "h",                                 600, NULL },
-  { "i",                                 600, NULL },
-  { "Oslash",                            600, NULL },
-  { "dagger",                            600, NULL },
-  { "j",                                 600, NULL },
-  { "k",                                 600, NULL },
-  { "l",                                 600, NULL },
-  { "m",                                 600, NULL },
-  { "n",                                 600, NULL },
-  { "tcommaaccent",                      600, NULL },
-  { "o",                                 600, NULL },
-  { "ordfeminine",                       600, NULL },
-  { "ring",                              600, NULL },
-  { "p",                                 600, NULL },
-  { "q",                                 600, NULL },
-  { "uhungarumlaut",                     600, NULL },
-  { "r",                                 600, NULL },
-  { "twosuperior",                       600, NULL },
-  { "aacute",                            600, NULL },
-  { "s",                                 600, NULL },
-  { "OE",                                600, NULL },
-  { "t",                                 600, NULL },
-  { "divide",                            600, NULL },
-  { "u",                                 600, NULL },
-  { "Ccaron",                            600, NULL },
-  { "v",                                 600, NULL },
-  { "w",                                 600, NULL },
-  { "x",                                 600, NULL },
-  { "y",                                 600, NULL },
-  { "z",                                 600, NULL },
-  { "Gbreve",                            600, NULL },
-  { "commaaccent",                       600, NULL },
-  { "hungarumlaut",                      600, NULL },
-  { "Idotaccent",                        600, NULL },
-  { "Nacute",                            600, NULL },
-  { "quotedbl",                          600, NULL },
-  { "gcommaaccent",                      600, NULL },
-  { "mu",                                600, NULL },
-  { "greaterequal",                      600, NULL },
-  { "Scaron",                            600, NULL },
-  { "Lslash",                            600, NULL },
-  { "semicolon",                         600, NULL },
-  { "oslash",                            600, NULL },
-  { "lessequal",                         600, NULL },
-  { "lozenge",                           600, NULL },
-  { "parenright",                        600, NULL },
-  { "ccaron",                            600, NULL },
-  { "Ecircumflex",                       600, NULL },
-  { "gbreve",                            600, NULL },
-  { "trademark",                         600, NULL },
-  { "daggerdbl",                         600, NULL },
-  { "nacute",                            600, NULL },
-  { "macron",                            600, NULL },
-  { "Otilde",                            600, NULL },
-  { "Emacron",                           600, NULL },
-  { "ellipsis",                          600, NULL },
-  { "scaron",                            600, NULL },
-  { "AE",                                600, NULL },
-  { "Ucircumflex",                       600, NULL },
-  { "lslash",                            600, NULL },
-  { "quotedblleft",                      600, NULL },
-  { "hyphen",                            600, NULL },
-  { "guilsinglright",                    600, NULL },
-  { "quotesingle",                       600, NULL },
-  { "eight",                             600, NULL },
-  { "exclamdown",                        600, NULL },
-  { "endash",                            600, NULL },
-  { "oe",                                600, NULL },
-  { "Abreve",                            600, NULL },
-  { "Umacron",                           600, NULL },
-  { "ecircumflex",                       600, NULL },
-  { "Adieresis",                         600, NULL },
-  { "copyright",                         600, NULL },
-  { "Egrave",                            600, NULL },
-  { "slash",                             600, NULL },
-  { "Edieresis",                         600, NULL },
-  { "otilde",                            600, NULL },
-  { "Idieresis",                         600, NULL },
-  { "parenleft",                         600, NULL },
-  { "one",                               600, NULL },
-  { "emacron",                           600, NULL },
-  { "Odieresis",                         600, NULL },
-  { "ucircumflex",                       600, NULL },
-  { "bracketleft",                       600, NULL },
-  { "Ugrave",                            600, NULL },
-  { "quoteright",                        600, NULL },
-  { "Udieresis",                         600, NULL },
-  { "perthousand",                       600, NULL },
-  { "Ydieresis",                         600, NULL },
-  { "umacron",                           600, NULL },
-  { "abreve",                            600, NULL },
-  { "Eacute",                            600, NULL },
-  { "adieresis",                         600, NULL },
-  { "egrave",                            600, NULL },
-  { "edieresis",                         600, NULL },
-  { "idieresis",                         600, NULL },
-  { "Eth",                               600, NULL },
-  { "ae",                                600, NULL },
-  { "asterisk",                          600, NULL },
-  { "odieresis",                         600, NULL },
-  { "Uacute",                            600, NULL },
-  { "ugrave",                            600, NULL },
-  { "five",                              600, NULL },
-  { "nine",                              600, NULL },
-  { "udieresis",                         600, NULL },
-  { "Zcaron",                            600, NULL },
-  { "Scommaaccent",                      600, NULL },
-  { "threequarters",                     600, NULL },
-  { "guillemotright",                    600, NULL },
-  { "Ccedilla",                          600, NULL },
-  { "ydieresis",                         600, NULL },
-  { "tilde",                             600, NULL },
-  { "at",                                600, NULL },
-  { "eacute",                            600, NULL },
-  { "underscore",                        600, NULL },
-  { "Euro",                              600, NULL },
-  { "Dcroat",                            600, NULL },
-  { "zero",                              600, NULL },
-  { "multiply",                          600, NULL },
-  { "eth",                               600, NULL },
-  { "Scedilla",                          600, NULL },
-  { "Racute",                            600, NULL },
-  { "Ograve",                            600, NULL },
-  { "partialdiff",                       600, NULL },
-  { "uacute",                            600, NULL },
-  { "braceleft",                         600, NULL },
-  { "Thorn",                             600, NULL },
-  { "zcaron",                            600, NULL },
-  { "scommaaccent",                      600, NULL },
-  { "ccedilla",                          600, NULL },
-  { "Dcaron",                            600, NULL },
-  { "dcroat",                            600, NULL },
-  { "scedilla",                          600, NULL },
-  { "Oacute",                            600, NULL },
-  { "Ocircumflex",                       600, NULL },
-  { "ogonek",                            600, NULL },
-  { "ograve",                            600, NULL },
-  { "racute",                            600, NULL },
-  { "Tcaron",                            600, NULL },
-  { "Eogonek",                           600, NULL },
-  { "thorn",                             600, NULL },
-  { "degree",                            600, NULL },
-  { "registered",                        600, NULL },
-  { "radical",                           600, NULL },
-  { "Aring",                             600, NULL },
-  { "percent",                           600, NULL },
-  { "six",                               600, NULL },
-  { "paragraph",                         600, NULL },
-  { "dcaron",                            600, NULL },
-  { "Uogonek",                           600, NULL },
-  { "two",                               600, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            600, NULL },
-  { "Lacute",                            600, NULL },
-  { "ocircumflex",                       600, NULL },
-  { "oacute",                            600, NULL },
-  { "Uring",                             600, NULL },
-  { "Lcommaaccent",                      600, NULL },
-  { "tcaron",                            600, NULL },
-  { "eogonek",                           600, NULL },
-  { "Delta",                             600, NULL },
-  { "Ohungarumlaut",                     600, NULL },
-  { "asciicircum",                       600, NULL },
-  { "aring",                             600, NULL },
-  { "grave",                             600, NULL },
-  { "uogonek",                           600, NULL },
-  { "bracketright",                      600, NULL },
-  { "ampersand",                         600, NULL },
-  { "Iacute",                            600, NULL },
-  { "lacute",                            600, NULL },
-  { "igrave",                            600, NULL },
-  { "Ncaron",                            600, NULL },
-  { "plus",                              600, NULL },
-  { "uring",                             600, NULL },
-  { "quotesinglbase",                    600, NULL },
-  { "lcommaaccent",                      600, NULL },
-  { "Yacute",                            600, NULL },
-  { "ohungarumlaut",                     600, NULL },
-  { "threesuperior",                     600, NULL },
-  { "acute",                             600, NULL },
-  { "section",                           600, NULL },
-  { "dieresis",                          600, NULL },
-  { "quotedblbase",                      600, NULL },
-  { "iacute",                            600, NULL },
-  { "ncaron",                            600, NULL },
-  { "florin",                            600, NULL },
-  { "yacute",                            600, NULL },
-  { "Rcommaaccent",                      600, NULL },
-  { "fi",                                600, NULL },
-  { "fl",                                600, NULL },
-  { "Acircumflex",                       600, NULL },
-  { "Cacute",                            600, NULL },
-  { "Icircumflex",                       600, NULL },
-  { "guillemotleft",                     600, NULL },
-  { "germandbls",                        600, NULL },
-  { "seven",                             600, NULL },
-  { "Amacron",                           600, NULL },
-  { "Sacute",                            600, NULL },
-  { "ordmasculine",                      600, NULL },
-  { "dotlessi",                          600, NULL },
-  { "sterling",                          600, NULL },
-  { "notequal",                          600, NULL },
-  { "Imacron",                           600, NULL },
-  { "rcommaaccent",                      600, NULL },
-  { "Zdotaccent",                        600, NULL },
-  { "acircumflex",                       600, NULL },
-  { "cacute",                            600, NULL },
-  { "Ecaron",                            600, NULL },
-  { "braceright",                        600, NULL },
-  { "icircumflex",                       600, NULL },
-  { "quotedblright",                     600, NULL },
-  { "amacron",                           600, NULL },
-  { "sacute",                            600, NULL },
-  { "imacron",                           600, NULL },
-  { "cent",                              600, NULL },
-  { "currency",                          600, NULL },
-  { "logicalnot",                        600, NULL },
-  { "zdotaccent",                        600, NULL },
-  { "Atilde",                            600, NULL },
-  { "breve",                             600, NULL },
-  { "bar",                               600, NULL },
-  { "fraction",                          600, NULL },
-  { "less",                              600, NULL },
-  { "ecaron",                            600, NULL },
-  { "guilsinglleft",                     600, NULL },
-  { "exclam",                            600, NULL },
-  { "period",                            600, NULL },
-  { "Rcaron",                            600, NULL },
-  { "Kcommaaccent",                      600, NULL },
-  { "greater",                           600, NULL },
-  { "atilde",                            600, NULL },
-  { "brokenbar",                         600, NULL },
-  { "quoteleft",                         600, NULL },
-  { "Edotaccent",                        600, NULL },
-  { "onesuperior",                       600, NULL }
+  { "Ntilde",                            600, nullptr },
+  { "rcaron",                            600, nullptr },
+  { "kcommaaccent",                      600, nullptr },
+  { "Ncommaaccent",                      600, nullptr },
+  { "Zacute",                            600, nullptr },
+  { "comma",                             600, nullptr },
+  { "cedilla",                           600, nullptr },
+  { "plusminus",                         600, nullptr },
+  { "circumflex",                        600, nullptr },
+  { "dotaccent",                         600, nullptr },
+  { "edotaccent",                        600, nullptr },
+  { "asciitilde",                        600, nullptr },
+  { "colon",                             600, nullptr },
+  { "onehalf",                           600, nullptr },
+  { "dollar",                            600, nullptr },
+  { "Lcaron",                            600, nullptr },
+  { "ntilde",                            600, nullptr },
+  { "Aogonek",                           600, nullptr },
+  { "ncommaaccent",                      600, nullptr },
+  { "minus",                             600, nullptr },
+  { "Iogonek",                           600, nullptr },
+  { "zacute",                            600, nullptr },
+  { "yen",                               600, nullptr },
+  { "space",                             600, nullptr },
+  { "Omacron",                           600, nullptr },
+  { "questiondown",                      600, nullptr },
+  { "emdash",                            600, nullptr },
+  { "Agrave",                            600, nullptr },
+  { "three",                             600, nullptr },
+  { "numbersign",                        600, nullptr },
+  { "lcaron",                            600, nullptr },
+  { "A",                                 600, nullptr },
+  { "B",                                 600, nullptr },
+  { "C",                                 600, nullptr },
+  { "aogonek",                           600, nullptr },
+  { "D",                                 600, nullptr },
+  { "E",                                 600, nullptr },
+  { "onequarter",                        600, nullptr },
+  { "F",                                 600, nullptr },
+  { "G",                                 600, nullptr },
+  { "H",                                 600, nullptr },
+  { "I",                                 600, nullptr },
+  { "J",                                 600, nullptr },
+  { "K",                                 600, nullptr },
+  { "iogonek",                           600, nullptr },
+  { "L",                                 600, nullptr },
+  { "backslash",                         600, nullptr },
+  { "periodcentered",                    600, nullptr },
+  { "M",                                 600, nullptr },
+  { "N",                                 600, nullptr },
+  { "omacron",                           600, nullptr },
+  { "Tcommaaccent",                      600, nullptr },
+  { "O",                                 600, nullptr },
+  { "P",                                 600, nullptr },
+  { "Q",                                 600, nullptr },
+  { "Uhungarumlaut",                     600, nullptr },
+  { "R",                                 600, nullptr },
+  { "Aacute",                            600, nullptr },
+  { "caron",                             600, nullptr },
+  { "S",                                 600, nullptr },
+  { "T",                                 600, nullptr },
+  { "U",                                 600, nullptr },
+  { "agrave",                            600, nullptr },
+  { "V",                                 600, nullptr },
+  { "W",                                 600, nullptr },
+  { "equal",                             600, nullptr },
+  { "question",                          600, nullptr },
+  { "X",                                 600, nullptr },
+  { "Y",                                 600, nullptr },
+  { "Z",                                 600, nullptr },
+  { "four",                              600, nullptr },
+  { "a",                                 600, nullptr },
+  { "Gcommaaccent",                      600, nullptr },
+  { "b",                                 600, nullptr },
+  { "c",                                 600, nullptr },
+  { "d",                                 600, nullptr },
+  { "e",                                 600, nullptr },
+  { "f",                                 600, nullptr },
+  { "g",                                 600, nullptr },
+  { "bullet",                            600, nullptr },
+  { "h",                                 600, nullptr },
+  { "i",                                 600, nullptr },
+  { "Oslash",                            600, nullptr },
+  { "dagger",                            600, nullptr },
+  { "j",                                 600, nullptr },
+  { "k",                                 600, nullptr },
+  { "l",                                 600, nullptr },
+  { "m",                                 600, nullptr },
+  { "n",                                 600, nullptr },
+  { "tcommaaccent",                      600, nullptr },
+  { "o",                                 600, nullptr },
+  { "ordfeminine",                       600, nullptr },
+  { "ring",                              600, nullptr },
+  { "p",                                 600, nullptr },
+  { "q",                                 600, nullptr },
+  { "uhungarumlaut",                     600, nullptr },
+  { "r",                                 600, nullptr },
+  { "twosuperior",                       600, nullptr },
+  { "aacute",                            600, nullptr },
+  { "s",                                 600, nullptr },
+  { "OE",                                600, nullptr },
+  { "t",                                 600, nullptr },
+  { "divide",                            600, nullptr },
+  { "u",                                 600, nullptr },
+  { "Ccaron",                            600, nullptr },
+  { "v",                                 600, nullptr },
+  { "w",                                 600, nullptr },
+  { "x",                                 600, nullptr },
+  { "y",                                 600, nullptr },
+  { "z",                                 600, nullptr },
+  { "Gbreve",                            600, nullptr },
+  { "commaaccent",                       600, nullptr },
+  { "hungarumlaut",                      600, nullptr },
+  { "Idotaccent",                        600, nullptr },
+  { "Nacute",                            600, nullptr },
+  { "quotedbl",                          600, nullptr },
+  { "gcommaaccent",                      600, nullptr },
+  { "mu",                                600, nullptr },
+  { "greaterequal",                      600, nullptr },
+  { "Scaron",                            600, nullptr },
+  { "Lslash",                            600, nullptr },
+  { "semicolon",                         600, nullptr },
+  { "oslash",                            600, nullptr },
+  { "lessequal",                         600, nullptr },
+  { "lozenge",                           600, nullptr },
+  { "parenright",                        600, nullptr },
+  { "ccaron",                            600, nullptr },
+  { "Ecircumflex",                       600, nullptr },
+  { "gbreve",                            600, nullptr },
+  { "trademark",                         600, nullptr },
+  { "daggerdbl",                         600, nullptr },
+  { "nacute",                            600, nullptr },
+  { "macron",                            600, nullptr },
+  { "Otilde",                            600, nullptr },
+  { "Emacron",                           600, nullptr },
+  { "ellipsis",                          600, nullptr },
+  { "scaron",                            600, nullptr },
+  { "AE",                                600, nullptr },
+  { "Ucircumflex",                       600, nullptr },
+  { "lslash",                            600, nullptr },
+  { "quotedblleft",                      600, nullptr },
+  { "hyphen",                            600, nullptr },
+  { "guilsinglright",                    600, nullptr },
+  { "quotesingle",                       600, nullptr },
+  { "eight",                             600, nullptr },
+  { "exclamdown",                        600, nullptr },
+  { "endash",                            600, nullptr },
+  { "oe",                                600, nullptr },
+  { "Abreve",                            600, nullptr },
+  { "Umacron",                           600, nullptr },
+  { "ecircumflex",                       600, nullptr },
+  { "Adieresis",                         600, nullptr },
+  { "copyright",                         600, nullptr },
+  { "Egrave",                            600, nullptr },
+  { "slash",                             600, nullptr },
+  { "Edieresis",                         600, nullptr },
+  { "otilde",                            600, nullptr },
+  { "Idieresis",                         600, nullptr },
+  { "parenleft",                         600, nullptr },
+  { "one",                               600, nullptr },
+  { "emacron",                           600, nullptr },
+  { "Odieresis",                         600, nullptr },
+  { "ucircumflex",                       600, nullptr },
+  { "bracketleft",                       600, nullptr },
+  { "Ugrave",                            600, nullptr },
+  { "quoteright",                        600, nullptr },
+  { "Udieresis",                         600, nullptr },
+  { "perthousand",                       600, nullptr },
+  { "Ydieresis",                         600, nullptr },
+  { "umacron",                           600, nullptr },
+  { "abreve",                            600, nullptr },
+  { "Eacute",                            600, nullptr },
+  { "adieresis",                         600, nullptr },
+  { "egrave",                            600, nullptr },
+  { "edieresis",                         600, nullptr },
+  { "idieresis",                         600, nullptr },
+  { "Eth",                               600, nullptr },
+  { "ae",                                600, nullptr },
+  { "asterisk",                          600, nullptr },
+  { "odieresis",                         600, nullptr },
+  { "Uacute",                            600, nullptr },
+  { "ugrave",                            600, nullptr },
+  { "five",                              600, nullptr },
+  { "nine",                              600, nullptr },
+  { "udieresis",                         600, nullptr },
+  { "Zcaron",                            600, nullptr },
+  { "Scommaaccent",                      600, nullptr },
+  { "threequarters",                     600, nullptr },
+  { "guillemotright",                    600, nullptr },
+  { "Ccedilla",                          600, nullptr },
+  { "ydieresis",                         600, nullptr },
+  { "tilde",                             600, nullptr },
+  { "at",                                600, nullptr },
+  { "eacute",                            600, nullptr },
+  { "underscore",                        600, nullptr },
+  { "Euro",                              600, nullptr },
+  { "Dcroat",                            600, nullptr },
+  { "zero",                              600, nullptr },
+  { "multiply",                          600, nullptr },
+  { "eth",                               600, nullptr },
+  { "Scedilla",                          600, nullptr },
+  { "Racute",                            600, nullptr },
+  { "Ograve",                            600, nullptr },
+  { "partialdiff",                       600, nullptr },
+  { "uacute",                            600, nullptr },
+  { "braceleft",                         600, nullptr },
+  { "Thorn",                             600, nullptr },
+  { "zcaron",                            600, nullptr },
+  { "scommaaccent",                      600, nullptr },
+  { "ccedilla",                          600, nullptr },
+  { "Dcaron",                            600, nullptr },
+  { "dcroat",                            600, nullptr },
+  { "scedilla",                          600, nullptr },
+  { "Oacute",                            600, nullptr },
+  { "Ocircumflex",                       600, nullptr },
+  { "ogonek",                            600, nullptr },
+  { "ograve",                            600, nullptr },
+  { "racute",                            600, nullptr },
+  { "Tcaron",                            600, nullptr },
+  { "Eogonek",                           600, nullptr },
+  { "thorn",                             600, nullptr },
+  { "degree",                            600, nullptr },
+  { "registered",                        600, nullptr },
+  { "radical",                           600, nullptr },
+  { "Aring",                             600, nullptr },
+  { "percent",                           600, nullptr },
+  { "six",                               600, nullptr },
+  { "paragraph",                         600, nullptr },
+  { "dcaron",                            600, nullptr },
+  { "Uogonek",                           600, nullptr },
+  { "two",                               600, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            600, nullptr },
+  { "Lacute",                            600, nullptr },
+  { "ocircumflex",                       600, nullptr },
+  { "oacute",                            600, nullptr },
+  { "Uring",                             600, nullptr },
+  { "Lcommaaccent",                      600, nullptr },
+  { "tcaron",                            600, nullptr },
+  { "eogonek",                           600, nullptr },
+  { "Delta",                             600, nullptr },
+  { "Ohungarumlaut",                     600, nullptr },
+  { "asciicircum",                       600, nullptr },
+  { "aring",                             600, nullptr },
+  { "grave",                             600, nullptr },
+  { "uogonek",                           600, nullptr },
+  { "bracketright",                      600, nullptr },
+  { "ampersand",                         600, nullptr },
+  { "Iacute",                            600, nullptr },
+  { "lacute",                            600, nullptr },
+  { "igrave",                            600, nullptr },
+  { "Ncaron",                            600, nullptr },
+  { "plus",                              600, nullptr },
+  { "uring",                             600, nullptr },
+  { "quotesinglbase",                    600, nullptr },
+  { "lcommaaccent",                      600, nullptr },
+  { "Yacute",                            600, nullptr },
+  { "ohungarumlaut",                     600, nullptr },
+  { "threesuperior",                     600, nullptr },
+  { "acute",                             600, nullptr },
+  { "section",                           600, nullptr },
+  { "dieresis",                          600, nullptr },
+  { "quotedblbase",                      600, nullptr },
+  { "iacute",                            600, nullptr },
+  { "ncaron",                            600, nullptr },
+  { "florin",                            600, nullptr },
+  { "yacute",                            600, nullptr },
+  { "Rcommaaccent",                      600, nullptr },
+  { "fi",                                600, nullptr },
+  { "fl",                                600, nullptr },
+  { "Acircumflex",                       600, nullptr },
+  { "Cacute",                            600, nullptr },
+  { "Icircumflex",                       600, nullptr },
+  { "guillemotleft",                     600, nullptr },
+  { "germandbls",                        600, nullptr },
+  { "seven",                             600, nullptr },
+  { "Amacron",                           600, nullptr },
+  { "Sacute",                            600, nullptr },
+  { "ordmasculine",                      600, nullptr },
+  { "dotlessi",                          600, nullptr },
+  { "sterling",                          600, nullptr },
+  { "notequal",                          600, nullptr },
+  { "Imacron",                           600, nullptr },
+  { "rcommaaccent",                      600, nullptr },
+  { "Zdotaccent",                        600, nullptr },
+  { "acircumflex",                       600, nullptr },
+  { "cacute",                            600, nullptr },
+  { "Ecaron",                            600, nullptr },
+  { "braceright",                        600, nullptr },
+  { "icircumflex",                       600, nullptr },
+  { "quotedblright",                     600, nullptr },
+  { "amacron",                           600, nullptr },
+  { "sacute",                            600, nullptr },
+  { "imacron",                           600, nullptr },
+  { "cent",                              600, nullptr },
+  { "currency",                          600, nullptr },
+  { "logicalnot",                        600, nullptr },
+  { "zdotaccent",                        600, nullptr },
+  { "Atilde",                            600, nullptr },
+  { "breve",                             600, nullptr },
+  { "bar",                               600, nullptr },
+  { "fraction",                          600, nullptr },
+  { "less",                              600, nullptr },
+  { "ecaron",                            600, nullptr },
+  { "guilsinglleft",                     600, nullptr },
+  { "exclam",                            600, nullptr },
+  { "period",                            600, nullptr },
+  { "Rcaron",                            600, nullptr },
+  { "Kcommaaccent",                      600, nullptr },
+  { "greater",                           600, nullptr },
+  { "atilde",                            600, nullptr },
+  { "brokenbar",                         600, nullptr },
+  { "quoteleft",                         600, nullptr },
+  { "Edotaccent",                        600, nullptr },
+  { "onesuperior",                       600, nullptr }
 };
 
 static BuiltinFontWidth courierBoldWidthsTab[] = {
-  { "Ntilde",                            600, NULL },
-  { "rcaron",                            600, NULL },
-  { "kcommaaccent",                      600, NULL },
-  { "Ncommaaccent",                      600, NULL },
-  { "Zacute",                            600, NULL },
-  { "comma",                             600, NULL },
-  { "cedilla",                           600, NULL },
-  { "plusminus",                         600, NULL },
-  { "circumflex",                        600, NULL },
-  { "dotaccent",                         600, NULL },
-  { "edotaccent",                        600, NULL },
-  { "asciitilde",                        600, NULL },
-  { "colon",                             600, NULL },
-  { "onehalf",                           600, NULL },
-  { "dollar",                            600, NULL },
-  { "Lcaron",                            600, NULL },
-  { "ntilde",                            600, NULL },
-  { "Aogonek",                           600, NULL },
-  { "ncommaaccent",                      600, NULL },
-  { "minus",                             600, NULL },
-  { "Iogonek",                           600, NULL },
-  { "zacute",                            600, NULL },
-  { "yen",                               600, NULL },
-  { "space",                             600, NULL },
-  { "Omacron",                           600, NULL },
-  { "questiondown",                      600, NULL },
-  { "emdash",                            600, NULL },
-  { "Agrave",                            600, NULL },
-  { "three",                             600, NULL },
-  { "numbersign",                        600, NULL },
-  { "lcaron",                            600, NULL },
-  { "A",                                 600, NULL },
-  { "B",                                 600, NULL },
-  { "C",                                 600, NULL },
-  { "aogonek",                           600, NULL },
-  { "D",                                 600, NULL },
-  { "E",                                 600, NULL },
-  { "onequarter",                        600, NULL },
-  { "F",                                 600, NULL },
-  { "G",                                 600, NULL },
-  { "H",                                 600, NULL },
-  { "I",                                 600, NULL },
-  { "J",                                 600, NULL },
-  { "K",                                 600, NULL },
-  { "iogonek",                           600, NULL },
-  { "backslash",                         600, NULL },
-  { "L",                                 600, NULL },
-  { "periodcentered",                    600, NULL },
-  { "M",                                 600, NULL },
-  { "N",                                 600, NULL },
-  { "omacron",                           600, NULL },
-  { "Tcommaaccent",                      600, NULL },
-  { "O",                                 600, NULL },
-  { "P",                                 600, NULL },
-  { "Q",                                 600, NULL },
-  { "Uhungarumlaut",                     600, NULL },
-  { "R",                                 600, NULL },
-  { "Aacute",                            600, NULL },
-  { "caron",                             600, NULL },
-  { "S",                                 600, NULL },
-  { "T",                                 600, NULL },
-  { "U",                                 600, NULL },
-  { "agrave",                            600, NULL },
-  { "V",                                 600, NULL },
-  { "W",                                 600, NULL },
-  { "X",                                 600, NULL },
-  { "question",                          600, NULL },
-  { "equal",                             600, NULL },
-  { "Y",                                 600, NULL },
-  { "Z",                                 600, NULL },
-  { "four",                              600, NULL },
-  { "a",                                 600, NULL },
-  { "Gcommaaccent",                      600, NULL },
-  { "b",                                 600, NULL },
-  { "c",                                 600, NULL },
-  { "d",                                 600, NULL },
-  { "e",                                 600, NULL },
-  { "f",                                 600, NULL },
-  { "g",                                 600, NULL },
-  { "bullet",                            600, NULL },
-  { "h",                                 600, NULL },
-  { "i",                                 600, NULL },
-  { "Oslash",                            600, NULL },
-  { "dagger",                            600, NULL },
-  { "j",                                 600, NULL },
-  { "k",                                 600, NULL },
-  { "l",                                 600, NULL },
-  { "m",                                 600, NULL },
-  { "n",                                 600, NULL },
-  { "tcommaaccent",                      600, NULL },
-  { "o",                                 600, NULL },
-  { "ordfeminine",                       600, NULL },
-  { "ring",                              600, NULL },
-  { "p",                                 600, NULL },
-  { "q",                                 600, NULL },
-  { "uhungarumlaut",                     600, NULL },
-  { "r",                                 600, NULL },
-  { "twosuperior",                       600, NULL },
-  { "aacute",                            600, NULL },
-  { "s",                                 600, NULL },
-  { "OE",                                600, NULL },
-  { "t",                                 600, NULL },
-  { "divide",                            600, NULL },
-  { "u",                                 600, NULL },
-  { "Ccaron",                            600, NULL },
-  { "v",                                 600, NULL },
-  { "w",                                 600, NULL },
-  { "x",                                 600, NULL },
-  { "y",                                 600, NULL },
-  { "z",                                 600, NULL },
-  { "Gbreve",                            600, NULL },
-  { "commaaccent",                       600, NULL },
-  { "hungarumlaut",                      600, NULL },
-  { "Idotaccent",                        600, NULL },
-  { "Nacute",                            600, NULL },
-  { "quotedbl",                          600, NULL },
-  { "gcommaaccent",                      600, NULL },
-  { "mu",                                600, NULL },
-  { "greaterequal",                      600, NULL },
-  { "Scaron",                            600, NULL },
-  { "Lslash",                            600, NULL },
-  { "semicolon",                         600, NULL },
-  { "oslash",                            600, NULL },
-  { "lessequal",                         600, NULL },
-  { "lozenge",                           600, NULL },
-  { "parenright",                        600, NULL },
-  { "ccaron",                            600, NULL },
-  { "Ecircumflex",                       600, NULL },
-  { "gbreve",                            600, NULL },
-  { "trademark",                         600, NULL },
-  { "daggerdbl",                         600, NULL },
-  { "nacute",                            600, NULL },
-  { "macron",                            600, NULL },
-  { "Otilde",                            600, NULL },
-  { "Emacron",                           600, NULL },
-  { "ellipsis",                          600, NULL },
-  { "scaron",                            600, NULL },
-  { "AE",                                600, NULL },
-  { "Ucircumflex",                       600, NULL },
-  { "lslash",                            600, NULL },
-  { "quotedblleft",                      600, NULL },
-  { "guilsinglright",                    600, NULL },
-  { "hyphen",                            600, NULL },
-  { "quotesingle",                       600, NULL },
-  { "eight",                             600, NULL },
-  { "exclamdown",                        600, NULL },
-  { "endash",                            600, NULL },
-  { "oe",                                600, NULL },
-  { "Abreve",                            600, NULL },
-  { "Umacron",                           600, NULL },
-  { "ecircumflex",                       600, NULL },
-  { "Adieresis",                         600, NULL },
-  { "copyright",                         600, NULL },
-  { "Egrave",                            600, NULL },
-  { "slash",                             600, NULL },
-  { "Edieresis",                         600, NULL },
-  { "otilde",                            600, NULL },
-  { "Idieresis",                         600, NULL },
-  { "parenleft",                         600, NULL },
-  { "one",                               600, NULL },
-  { "emacron",                           600, NULL },
-  { "Odieresis",                         600, NULL },
-  { "ucircumflex",                       600, NULL },
-  { "bracketleft",                       600, NULL },
-  { "Ugrave",                            600, NULL },
-  { "quoteright",                        600, NULL },
-  { "Udieresis",                         600, NULL },
-  { "perthousand",                       600, NULL },
-  { "Ydieresis",                         600, NULL },
-  { "umacron",                           600, NULL },
-  { "abreve",                            600, NULL },
-  { "Eacute",                            600, NULL },
-  { "adieresis",                         600, NULL },
-  { "egrave",                            600, NULL },
-  { "edieresis",                         600, NULL },
-  { "idieresis",                         600, NULL },
-  { "Eth",                               600, NULL },
-  { "ae",                                600, NULL },
-  { "asterisk",                          600, NULL },
-  { "odieresis",                         600, NULL },
-  { "Uacute",                            600, NULL },
-  { "ugrave",                            600, NULL },
-  { "nine",                              600, NULL },
-  { "five",                              600, NULL },
-  { "udieresis",                         600, NULL },
-  { "Zcaron",                            600, NULL },
-  { "Scommaaccent",                      600, NULL },
-  { "threequarters",                     600, NULL },
-  { "guillemotright",                    600, NULL },
-  { "Ccedilla",                          600, NULL },
-  { "ydieresis",                         600, NULL },
-  { "tilde",                             600, NULL },
-  { "at",                                600, NULL },
-  { "eacute",                            600, NULL },
-  { "underscore",                        600, NULL },
-  { "Euro",                              600, NULL },
-  { "Dcroat",                            600, NULL },
-  { "multiply",                          600, NULL },
-  { "zero",                              600, NULL },
-  { "eth",                               600, NULL },
-  { "Scedilla",                          600, NULL },
-  { "Ograve",                            600, NULL },
-  { "Racute",                            600, NULL },
-  { "partialdiff",                       600, NULL },
-  { "uacute",                            600, NULL },
-  { "braceleft",                         600, NULL },
-  { "Thorn",                             600, NULL },
-  { "zcaron",                            600, NULL },
-  { "scommaaccent",                      600, NULL },
-  { "ccedilla",                          600, NULL },
-  { "Dcaron",                            600, NULL },
-  { "dcroat",                            600, NULL },
-  { "Ocircumflex",                       600, NULL },
-  { "Oacute",                            600, NULL },
-  { "scedilla",                          600, NULL },
-  { "ogonek",                            600, NULL },
-  { "ograve",                            600, NULL },
-  { "racute",                            600, NULL },
-  { "Tcaron",                            600, NULL },
-  { "Eogonek",                           600, NULL },
-  { "thorn",                             600, NULL },
-  { "degree",                            600, NULL },
-  { "registered",                        600, NULL },
-  { "radical",                           600, NULL },
-  { "Aring",                             600, NULL },
-  { "percent",                           600, NULL },
-  { "six",                               600, NULL },
-  { "paragraph",                         600, NULL },
-  { "dcaron",                            600, NULL },
-  { "Uogonek",                           600, NULL },
-  { "two",                               600, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            600, NULL },
-  { "Lacute",                            600, NULL },
-  { "ocircumflex",                       600, NULL },
-  { "oacute",                            600, NULL },
-  { "Uring",                             600, NULL },
-  { "Lcommaaccent",                      600, NULL },
-  { "tcaron",                            600, NULL },
-  { "eogonek",                           600, NULL },
-  { "Delta",                             600, NULL },
-  { "Ohungarumlaut",                     600, NULL },
-  { "asciicircum",                       600, NULL },
-  { "aring",                             600, NULL },
-  { "grave",                             600, NULL },
-  { "uogonek",                           600, NULL },
-  { "bracketright",                      600, NULL },
-  { "Iacute",                            600, NULL },
-  { "ampersand",                         600, NULL },
-  { "igrave",                            600, NULL },
-  { "lacute",                            600, NULL },
-  { "Ncaron",                            600, NULL },
-  { "plus",                              600, NULL },
-  { "uring",                             600, NULL },
-  { "quotesinglbase",                    600, NULL },
-  { "lcommaaccent",                      600, NULL },
-  { "Yacute",                            600, NULL },
-  { "ohungarumlaut",                     600, NULL },
-  { "threesuperior",                     600, NULL },
-  { "acute",                             600, NULL },
-  { "section",                           600, NULL },
-  { "dieresis",                          600, NULL },
-  { "iacute",                            600, NULL },
-  { "quotedblbase",                      600, NULL },
-  { "ncaron",                            600, NULL },
-  { "florin",                            600, NULL },
-  { "yacute",                            600, NULL },
-  { "Rcommaaccent",                      600, NULL },
-  { "fi",                                600, NULL },
-  { "fl",                                600, NULL },
-  { "Acircumflex",                       600, NULL },
-  { "Cacute",                            600, NULL },
-  { "Icircumflex",                       600, NULL },
-  { "guillemotleft",                     600, NULL },
-  { "germandbls",                        600, NULL },
-  { "Amacron",                           600, NULL },
-  { "seven",                             600, NULL },
-  { "Sacute",                            600, NULL },
-  { "ordmasculine",                      600, NULL },
-  { "dotlessi",                          600, NULL },
-  { "sterling",                          600, NULL },
-  { "notequal",                          600, NULL },
-  { "Imacron",                           600, NULL },
-  { "rcommaaccent",                      600, NULL },
-  { "Zdotaccent",                        600, NULL },
-  { "acircumflex",                       600, NULL },
-  { "cacute",                            600, NULL },
-  { "Ecaron",                            600, NULL },
-  { "icircumflex",                       600, NULL },
-  { "braceright",                        600, NULL },
-  { "quotedblright",                     600, NULL },
-  { "amacron",                           600, NULL },
-  { "sacute",                            600, NULL },
-  { "imacron",                           600, NULL },
-  { "cent",                              600, NULL },
-  { "currency",                          600, NULL },
-  { "logicalnot",                        600, NULL },
-  { "zdotaccent",                        600, NULL },
-  { "Atilde",                            600, NULL },
-  { "breve",                             600, NULL },
-  { "bar",                               600, NULL },
-  { "fraction",                          600, NULL },
-  { "less",                              600, NULL },
-  { "ecaron",                            600, NULL },
-  { "guilsinglleft",                     600, NULL },
-  { "exclam",                            600, NULL },
-  { "period",                            600, NULL },
-  { "Rcaron",                            600, NULL },
-  { "Kcommaaccent",                      600, NULL },
-  { "greater",                           600, NULL },
-  { "atilde",                            600, NULL },
-  { "brokenbar",                         600, NULL },
-  { "quoteleft",                         600, NULL },
-  { "Edotaccent",                        600, NULL },
-  { "onesuperior",                       600, NULL }
+  { "Ntilde",                            600, nullptr },
+  { "rcaron",                            600, nullptr },
+  { "kcommaaccent",                      600, nullptr },
+  { "Ncommaaccent",                      600, nullptr },
+  { "Zacute",                            600, nullptr },
+  { "comma",                             600, nullptr },
+  { "cedilla",                           600, nullptr },
+  { "plusminus",                         600, nullptr },
+  { "circumflex",                        600, nullptr },
+  { "dotaccent",                         600, nullptr },
+  { "edotaccent",                        600, nullptr },
+  { "asciitilde",                        600, nullptr },
+  { "colon",                             600, nullptr },
+  { "onehalf",                           600, nullptr },
+  { "dollar",                            600, nullptr },
+  { "Lcaron",                            600, nullptr },
+  { "ntilde",                            600, nullptr },
+  { "Aogonek",                           600, nullptr },
+  { "ncommaaccent",                      600, nullptr },
+  { "minus",                             600, nullptr },
+  { "Iogonek",                           600, nullptr },
+  { "zacute",                            600, nullptr },
+  { "yen",                               600, nullptr },
+  { "space",                             600, nullptr },
+  { "Omacron",                           600, nullptr },
+  { "questiondown",                      600, nullptr },
+  { "emdash",                            600, nullptr },
+  { "Agrave",                            600, nullptr },
+  { "three",                             600, nullptr },
+  { "numbersign",                        600, nullptr },
+  { "lcaron",                            600, nullptr },
+  { "A",                                 600, nullptr },
+  { "B",                                 600, nullptr },
+  { "C",                                 600, nullptr },
+  { "aogonek",                           600, nullptr },
+  { "D",                                 600, nullptr },
+  { "E",                                 600, nullptr },
+  { "onequarter",                        600, nullptr },
+  { "F",                                 600, nullptr },
+  { "G",                                 600, nullptr },
+  { "H",                                 600, nullptr },
+  { "I",                                 600, nullptr },
+  { "J",                                 600, nullptr },
+  { "K",                                 600, nullptr },
+  { "iogonek",                           600, nullptr },
+  { "backslash",                         600, nullptr },
+  { "L",                                 600, nullptr },
+  { "periodcentered",                    600, nullptr },
+  { "M",                                 600, nullptr },
+  { "N",                                 600, nullptr },
+  { "omacron",                           600, nullptr },
+  { "Tcommaaccent",                      600, nullptr },
+  { "O",                                 600, nullptr },
+  { "P",                                 600, nullptr },
+  { "Q",                                 600, nullptr },
+  { "Uhungarumlaut",                     600, nullptr },
+  { "R",                                 600, nullptr },
+  { "Aacute",                            600, nullptr },
+  { "caron",                             600, nullptr },
+  { "S",                                 600, nullptr },
+  { "T",                                 600, nullptr },
+  { "U",                                 600, nullptr },
+  { "agrave",                            600, nullptr },
+  { "V",                                 600, nullptr },
+  { "W",                                 600, nullptr },
+  { "X",                                 600, nullptr },
+  { "question",                          600, nullptr },
+  { "equal",                             600, nullptr },
+  { "Y",                                 600, nullptr },
+  { "Z",                                 600, nullptr },
+  { "four",                              600, nullptr },
+  { "a",                                 600, nullptr },
+  { "Gcommaaccent",                      600, nullptr },
+  { "b",                                 600, nullptr },
+  { "c",                                 600, nullptr },
+  { "d",                                 600, nullptr },
+  { "e",                                 600, nullptr },
+  { "f",                                 600, nullptr },
+  { "g",                                 600, nullptr },
+  { "bullet",                            600, nullptr },
+  { "h",                                 600, nullptr },
+  { "i",                                 600, nullptr },
+  { "Oslash",                            600, nullptr },
+  { "dagger",                            600, nullptr },
+  { "j",                                 600, nullptr },
+  { "k",                                 600, nullptr },
+  { "l",                                 600, nullptr },
+  { "m",                                 600, nullptr },
+  { "n",                                 600, nullptr },
+  { "tcommaaccent",                      600, nullptr },
+  { "o",                                 600, nullptr },
+  { "ordfeminine",                       600, nullptr },
+  { "ring",                              600, nullptr },
+  { "p",                                 600, nullptr },
+  { "q",                                 600, nullptr },
+  { "uhungarumlaut",                     600, nullptr },
+  { "r",                                 600, nullptr },
+  { "twosuperior",                       600, nullptr },
+  { "aacute",                            600, nullptr },
+  { "s",                                 600, nullptr },
+  { "OE",                                600, nullptr },
+  { "t",                                 600, nullptr },
+  { "divide",                            600, nullptr },
+  { "u",                                 600, nullptr },
+  { "Ccaron",                            600, nullptr },
+  { "v",                                 600, nullptr },
+  { "w",                                 600, nullptr },
+  { "x",                                 600, nullptr },
+  { "y",                                 600, nullptr },
+  { "z",                                 600, nullptr },
+  { "Gbreve",                            600, nullptr },
+  { "commaaccent",                       600, nullptr },
+  { "hungarumlaut",                      600, nullptr },
+  { "Idotaccent",                        600, nullptr },
+  { "Nacute",                            600, nullptr },
+  { "quotedbl",                          600, nullptr },
+  { "gcommaaccent",                      600, nullptr },
+  { "mu",                                600, nullptr },
+  { "greaterequal",                      600, nullptr },
+  { "Scaron",                            600, nullptr },
+  { "Lslash",                            600, nullptr },
+  { "semicolon",                         600, nullptr },
+  { "oslash",                            600, nullptr },
+  { "lessequal",                         600, nullptr },
+  { "lozenge",                           600, nullptr },
+  { "parenright",                        600, nullptr },
+  { "ccaron",                            600, nullptr },
+  { "Ecircumflex",                       600, nullptr },
+  { "gbreve",                            600, nullptr },
+  { "trademark",                         600, nullptr },
+  { "daggerdbl",                         600, nullptr },
+  { "nacute",                            600, nullptr },
+  { "macron",                            600, nullptr },
+  { "Otilde",                            600, nullptr },
+  { "Emacron",                           600, nullptr },
+  { "ellipsis",                          600, nullptr },
+  { "scaron",                            600, nullptr },
+  { "AE",                                600, nullptr },
+  { "Ucircumflex",                       600, nullptr },
+  { "lslash",                            600, nullptr },
+  { "quotedblleft",                      600, nullptr },
+  { "guilsinglright",                    600, nullptr },
+  { "hyphen",                            600, nullptr },
+  { "quotesingle",                       600, nullptr },
+  { "eight",                             600, nullptr },
+  { "exclamdown",                        600, nullptr },
+  { "endash",                            600, nullptr },
+  { "oe",                                600, nullptr },
+  { "Abreve",                            600, nullptr },
+  { "Umacron",                           600, nullptr },
+  { "ecircumflex",                       600, nullptr },
+  { "Adieresis",                         600, nullptr },
+  { "copyright",                         600, nullptr },
+  { "Egrave",                            600, nullptr },
+  { "slash",                             600, nullptr },
+  { "Edieresis",                         600, nullptr },
+  { "otilde",                            600, nullptr },
+  { "Idieresis",                         600, nullptr },
+  { "parenleft",                         600, nullptr },
+  { "one",                               600, nullptr },
+  { "emacron",                           600, nullptr },
+  { "Odieresis",                         600, nullptr },
+  { "ucircumflex",                       600, nullptr },
+  { "bracketleft",                       600, nullptr },
+  { "Ugrave",                            600, nullptr },
+  { "quoteright",                        600, nullptr },
+  { "Udieresis",                         600, nullptr },
+  { "perthousand",                       600, nullptr },
+  { "Ydieresis",                         600, nullptr },
+  { "umacron",                           600, nullptr },
+  { "abreve",                            600, nullptr },
+  { "Eacute",                            600, nullptr },
+  { "adieresis",                         600, nullptr },
+  { "egrave",                            600, nullptr },
+  { "edieresis",                         600, nullptr },
+  { "idieresis",                         600, nullptr },
+  { "Eth",                               600, nullptr },
+  { "ae",                                600, nullptr },
+  { "asterisk",                          600, nullptr },
+  { "odieresis",                         600, nullptr },
+  { "Uacute",                            600, nullptr },
+  { "ugrave",                            600, nullptr },
+  { "nine",                              600, nullptr },
+  { "five",                              600, nullptr },
+  { "udieresis",                         600, nullptr },
+  { "Zcaron",                            600, nullptr },
+  { "Scommaaccent",                      600, nullptr },
+  { "threequarters",                     600, nullptr },
+  { "guillemotright",                    600, nullptr },
+  { "Ccedilla",                          600, nullptr },
+  { "ydieresis",                         600, nullptr },
+  { "tilde",                             600, nullptr },
+  { "at",                                600, nullptr },
+  { "eacute",                            600, nullptr },
+  { "underscore",                        600, nullptr },
+  { "Euro",                              600, nullptr },
+  { "Dcroat",                            600, nullptr },
+  { "multiply",                          600, nullptr },
+  { "zero",                              600, nullptr },
+  { "eth",                               600, nullptr },
+  { "Scedilla",                          600, nullptr },
+  { "Ograve",                            600, nullptr },
+  { "Racute",                            600, nullptr },
+  { "partialdiff",                       600, nullptr },
+  { "uacute",                            600, nullptr },
+  { "braceleft",                         600, nullptr },
+  { "Thorn",                             600, nullptr },
+  { "zcaron",                            600, nullptr },
+  { "scommaaccent",                      600, nullptr },
+  { "ccedilla",                          600, nullptr },
+  { "Dcaron",                            600, nullptr },
+  { "dcroat",                            600, nullptr },
+  { "Ocircumflex",                       600, nullptr },
+  { "Oacute",                            600, nullptr },
+  { "scedilla",                          600, nullptr },
+  { "ogonek",                            600, nullptr },
+  { "ograve",                            600, nullptr },
+  { "racute",                            600, nullptr },
+  { "Tcaron",                            600, nullptr },
+  { "Eogonek",                           600, nullptr },
+  { "thorn",                             600, nullptr },
+  { "degree",                            600, nullptr },
+  { "registered",                        600, nullptr },
+  { "radical",                           600, nullptr },
+  { "Aring",                             600, nullptr },
+  { "percent",                           600, nullptr },
+  { "six",                               600, nullptr },
+  { "paragraph",                         600, nullptr },
+  { "dcaron",                            600, nullptr },
+  { "Uogonek",                           600, nullptr },
+  { "two",                               600, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            600, nullptr },
+  { "Lacute",                            600, nullptr },
+  { "ocircumflex",                       600, nullptr },
+  { "oacute",                            600, nullptr },
+  { "Uring",                             600, nullptr },
+  { "Lcommaaccent",                      600, nullptr },
+  { "tcaron",                            600, nullptr },
+  { "eogonek",                           600, nullptr },
+  { "Delta",                             600, nullptr },
+  { "Ohungarumlaut",                     600, nullptr },
+  { "asciicircum",                       600, nullptr },
+  { "aring",                             600, nullptr },
+  { "grave",                             600, nullptr },
+  { "uogonek",                           600, nullptr },
+  { "bracketright",                      600, nullptr },
+  { "Iacute",                            600, nullptr },
+  { "ampersand",                         600, nullptr },
+  { "igrave",                            600, nullptr },
+  { "lacute",                            600, nullptr },
+  { "Ncaron",                            600, nullptr },
+  { "plus",                              600, nullptr },
+  { "uring",                             600, nullptr },
+  { "quotesinglbase",                    600, nullptr },
+  { "lcommaaccent",                      600, nullptr },
+  { "Yacute",                            600, nullptr },
+  { "ohungarumlaut",                     600, nullptr },
+  { "threesuperior",                     600, nullptr },
+  { "acute",                             600, nullptr },
+  { "section",                           600, nullptr },
+  { "dieresis",                          600, nullptr },
+  { "iacute",                            600, nullptr },
+  { "quotedblbase",                      600, nullptr },
+  { "ncaron",                            600, nullptr },
+  { "florin",                            600, nullptr },
+  { "yacute",                            600, nullptr },
+  { "Rcommaaccent",                      600, nullptr },
+  { "fi",                                600, nullptr },
+  { "fl",                                600, nullptr },
+  { "Acircumflex",                       600, nullptr },
+  { "Cacute",                            600, nullptr },
+  { "Icircumflex",                       600, nullptr },
+  { "guillemotleft",                     600, nullptr },
+  { "germandbls",                        600, nullptr },
+  { "Amacron",                           600, nullptr },
+  { "seven",                             600, nullptr },
+  { "Sacute",                            600, nullptr },
+  { "ordmasculine",                      600, nullptr },
+  { "dotlessi",                          600, nullptr },
+  { "sterling",                          600, nullptr },
+  { "notequal",                          600, nullptr },
+  { "Imacron",                           600, nullptr },
+  { "rcommaaccent",                      600, nullptr },
+  { "Zdotaccent",                        600, nullptr },
+  { "acircumflex",                       600, nullptr },
+  { "cacute",                            600, nullptr },
+  { "Ecaron",                            600, nullptr },
+  { "icircumflex",                       600, nullptr },
+  { "braceright",                        600, nullptr },
+  { "quotedblright",                     600, nullptr },
+  { "amacron",                           600, nullptr },
+  { "sacute",                            600, nullptr },
+  { "imacron",                           600, nullptr },
+  { "cent",                              600, nullptr },
+  { "currency",                          600, nullptr },
+  { "logicalnot",                        600, nullptr },
+  { "zdotaccent",                        600, nullptr },
+  { "Atilde",                            600, nullptr },
+  { "breve",                             600, nullptr },
+  { "bar",                               600, nullptr },
+  { "fraction",                          600, nullptr },
+  { "less",                              600, nullptr },
+  { "ecaron",                            600, nullptr },
+  { "guilsinglleft",                     600, nullptr },
+  { "exclam",                            600, nullptr },
+  { "period",                            600, nullptr },
+  { "Rcaron",                            600, nullptr },
+  { "Kcommaaccent",                      600, nullptr },
+  { "greater",                           600, nullptr },
+  { "atilde",                            600, nullptr },
+  { "brokenbar",                         600, nullptr },
+  { "quoteleft",                         600, nullptr },
+  { "Edotaccent",                        600, nullptr },
+  { "onesuperior",                       600, nullptr }
 };
 
 static BuiltinFontWidth courierBoldObliqueWidthsTab[] = {
-  { "Ntilde",                            600, NULL },
-  { "rcaron",                            600, NULL },
-  { "kcommaaccent",                      600, NULL },
-  { "Ncommaaccent",                      600, NULL },
-  { "Zacute",                            600, NULL },
-  { "comma",                             600, NULL },
-  { "cedilla",                           600, NULL },
-  { "plusminus",                         600, NULL },
-  { "circumflex",                        600, NULL },
-  { "dotaccent",                         600, NULL },
-  { "edotaccent",                        600, NULL },
-  { "asciitilde",                        600, NULL },
-  { "colon",                             600, NULL },
-  { "onehalf",                           600, NULL },
-  { "dollar",                            600, NULL },
-  { "Lcaron",                            600, NULL },
-  { "ntilde",                            600, NULL },
-  { "Aogonek",                           600, NULL },
-  { "ncommaaccent",                      600, NULL },
-  { "minus",                             600, NULL },
-  { "Iogonek",                           600, NULL },
-  { "zacute",                            600, NULL },
-  { "yen",                               600, NULL },
-  { "space",                             600, NULL },
-  { "Omacron",                           600, NULL },
-  { "questiondown",                      600, NULL },
-  { "emdash",                            600, NULL },
-  { "Agrave",                            600, NULL },
-  { "three",                             600, NULL },
-  { "numbersign",                        600, NULL },
-  { "lcaron",                            600, NULL },
-  { "A",                                 600, NULL },
-  { "B",                                 600, NULL },
-  { "C",                                 600, NULL },
-  { "aogonek",                           600, NULL },
-  { "D",                                 600, NULL },
-  { "E",                                 600, NULL },
-  { "onequarter",                        600, NULL },
-  { "F",                                 600, NULL },
-  { "G",                                 600, NULL },
-  { "H",                                 600, NULL },
-  { "I",                                 600, NULL },
-  { "J",                                 600, NULL },
-  { "K",                                 600, NULL },
-  { "iogonek",                           600, NULL },
-  { "backslash",                         600, NULL },
-  { "L",                                 600, NULL },
-  { "periodcentered",                    600, NULL },
-  { "M",                                 600, NULL },
-  { "N",                                 600, NULL },
-  { "omacron",                           600, NULL },
-  { "Tcommaaccent",                      600, NULL },
-  { "O",                                 600, NULL },
-  { "P",                                 600, NULL },
-  { "Q",                                 600, NULL },
-  { "Uhungarumlaut",                     600, NULL },
-  { "R",                                 600, NULL },
-  { "Aacute",                            600, NULL },
-  { "caron",                             600, NULL },
-  { "S",                                 600, NULL },
-  { "T",                                 600, NULL },
-  { "U",                                 600, NULL },
-  { "agrave",                            600, NULL },
-  { "V",                                 600, NULL },
-  { "W",                                 600, NULL },
-  { "X",                                 600, NULL },
-  { "question",                          600, NULL },
-  { "equal",                             600, NULL },
-  { "Y",                                 600, NULL },
-  { "Z",                                 600, NULL },
-  { "four",                              600, NULL },
-  { "a",                                 600, NULL },
-  { "Gcommaaccent",                      600, NULL },
-  { "b",                                 600, NULL },
-  { "c",                                 600, NULL },
-  { "d",                                 600, NULL },
-  { "e",                                 600, NULL },
-  { "f",                                 600, NULL },
-  { "g",                                 600, NULL },
-  { "bullet",                            600, NULL },
-  { "h",                                 600, NULL },
-  { "i",                                 600, NULL },
-  { "Oslash",                            600, NULL },
-  { "dagger",                            600, NULL },
-  { "j",                                 600, NULL },
-  { "k",                                 600, NULL },
-  { "l",                                 600, NULL },
-  { "m",                                 600, NULL },
-  { "n",                                 600, NULL },
-  { "tcommaaccent",                      600, NULL },
-  { "o",                                 600, NULL },
-  { "ordfeminine",                       600, NULL },
-  { "ring",                              600, NULL },
-  { "p",                                 600, NULL },
-  { "q",                                 600, NULL },
-  { "uhungarumlaut",                     600, NULL },
-  { "r",                                 600, NULL },
-  { "twosuperior",                       600, NULL },
-  { "aacute",                            600, NULL },
-  { "s",                                 600, NULL },
-  { "OE",                                600, NULL },
-  { "t",                                 600, NULL },
-  { "divide",                            600, NULL },
-  { "u",                                 600, NULL },
-  { "Ccaron",                            600, NULL },
-  { "v",                                 600, NULL },
-  { "w",                                 600, NULL },
-  { "x",                                 600, NULL },
-  { "y",                                 600, NULL },
-  { "z",                                 600, NULL },
-  { "Gbreve",                            600, NULL },
-  { "commaaccent",                       600, NULL },
-  { "hungarumlaut",                      600, NULL },
-  { "Idotaccent",                        600, NULL },
-  { "Nacute",                            600, NULL },
-  { "quotedbl",                          600, NULL },
-  { "gcommaaccent",                      600, NULL },
-  { "mu",                                600, NULL },
-  { "greaterequal",                      600, NULL },
-  { "Scaron",                            600, NULL },
-  { "Lslash",                            600, NULL },
-  { "semicolon",                         600, NULL },
-  { "oslash",                            600, NULL },
-  { "lessequal",                         600, NULL },
-  { "lozenge",                           600, NULL },
-  { "parenright",                        600, NULL },
-  { "ccaron",                            600, NULL },
-  { "Ecircumflex",                       600, NULL },
-  { "gbreve",                            600, NULL },
-  { "trademark",                         600, NULL },
-  { "daggerdbl",                         600, NULL },
-  { "nacute",                            600, NULL },
-  { "macron",                            600, NULL },
-  { "Otilde",                            600, NULL },
-  { "Emacron",                           600, NULL },
-  { "ellipsis",                          600, NULL },
-  { "scaron",                            600, NULL },
-  { "AE",                                600, NULL },
-  { "Ucircumflex",                       600, NULL },
-  { "lslash",                            600, NULL },
-  { "quotedblleft",                      600, NULL },
-  { "guilsinglright",                    600, NULL },
-  { "hyphen",                            600, NULL },
-  { "quotesingle",                       600, NULL },
-  { "eight",                             600, NULL },
-  { "exclamdown",                        600, NULL },
-  { "endash",                            600, NULL },
-  { "oe",                                600, NULL },
-  { "Abreve",                            600, NULL },
-  { "Umacron",                           600, NULL },
-  { "ecircumflex",                       600, NULL },
-  { "Adieresis",                         600, NULL },
-  { "copyright",                         600, NULL },
-  { "Egrave",                            600, NULL },
-  { "slash",                             600, NULL },
-  { "Edieresis",                         600, NULL },
-  { "otilde",                            600, NULL },
-  { "Idieresis",                         600, NULL },
-  { "parenleft",                         600, NULL },
-  { "one",                               600, NULL },
-  { "emacron",                           600, NULL },
-  { "Odieresis",                         600, NULL },
-  { "ucircumflex",                       600, NULL },
-  { "bracketleft",                       600, NULL },
-  { "Ugrave",                            600, NULL },
-  { "quoteright",                        600, NULL },
-  { "Udieresis",                         600, NULL },
-  { "perthousand",                       600, NULL },
-  { "Ydieresis",                         600, NULL },
-  { "umacron",                           600, NULL },
-  { "abreve",                            600, NULL },
-  { "Eacute",                            600, NULL },
-  { "adieresis",                         600, NULL },
-  { "egrave",                            600, NULL },
-  { "edieresis",                         600, NULL },
-  { "idieresis",                         600, NULL },
-  { "Eth",                               600, NULL },
-  { "ae",                                600, NULL },
-  { "asterisk",                          600, NULL },
-  { "odieresis",                         600, NULL },
-  { "Uacute",                            600, NULL },
-  { "ugrave",                            600, NULL },
-  { "nine",                              600, NULL },
-  { "five",                              600, NULL },
-  { "udieresis",                         600, NULL },
-  { "Zcaron",                            600, NULL },
-  { "Scommaaccent",                      600, NULL },
-  { "threequarters",                     600, NULL },
-  { "guillemotright",                    600, NULL },
-  { "Ccedilla",                          600, NULL },
-  { "ydieresis",                         600, NULL },
-  { "tilde",                             600, NULL },
-  { "at",                                600, NULL },
-  { "eacute",                            600, NULL },
-  { "underscore",                        600, NULL },
-  { "Euro",                              600, NULL },
-  { "Dcroat",                            600, NULL },
-  { "multiply",                          600, NULL },
-  { "zero",                              600, NULL },
-  { "eth",                               600, NULL },
-  { "Scedilla",                          600, NULL },
-  { "Ograve",                            600, NULL },
-  { "Racute",                            600, NULL },
-  { "partialdiff",                       600, NULL },
-  { "uacute",                            600, NULL },
-  { "braceleft",                         600, NULL },
-  { "Thorn",                             600, NULL },
-  { "zcaron",                            600, NULL },
-  { "scommaaccent",                      600, NULL },
-  { "ccedilla",                          600, NULL },
-  { "Dcaron",                            600, NULL },
-  { "dcroat",                            600, NULL },
-  { "Ocircumflex",                       600, NULL },
-  { "Oacute",                            600, NULL },
-  { "scedilla",                          600, NULL },
-  { "ogonek",                            600, NULL },
-  { "ograve",                            600, NULL },
-  { "racute",                            600, NULL },
-  { "Tcaron",                            600, NULL },
-  { "Eogonek",                           600, NULL },
-  { "thorn",                             600, NULL },
-  { "degree",                            600, NULL },
-  { "registered",                        600, NULL },
-  { "radical",                           600, NULL },
-  { "Aring",                             600, NULL },
-  { "percent",                           600, NULL },
-  { "six",                               600, NULL },
-  { "paragraph",                         600, NULL },
-  { "dcaron",                            600, NULL },
-  { "Uogonek",                           600, NULL },
-  { "two",                               600, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            600, NULL },
-  { "Lacute",                            600, NULL },
-  { "ocircumflex",                       600, NULL },
-  { "oacute",                            600, NULL },
-  { "Uring",                             600, NULL },
-  { "Lcommaaccent",                      600, NULL },
-  { "tcaron",                            600, NULL },
-  { "eogonek",                           600, NULL },
-  { "Delta",                             600, NULL },
-  { "Ohungarumlaut",                     600, NULL },
-  { "asciicircum",                       600, NULL },
-  { "aring",                             600, NULL },
-  { "grave",                             600, NULL },
-  { "uogonek",                           600, NULL },
-  { "bracketright",                      600, NULL },
-  { "Iacute",                            600, NULL },
-  { "ampersand",                         600, NULL },
-  { "igrave",                            600, NULL },
-  { "lacute",                            600, NULL },
-  { "Ncaron",                            600, NULL },
-  { "plus",                              600, NULL },
-  { "uring",                             600, NULL },
-  { "quotesinglbase",                    600, NULL },
-  { "lcommaaccent",                      600, NULL },
-  { "Yacute",                            600, NULL },
-  { "ohungarumlaut",                     600, NULL },
-  { "threesuperior",                     600, NULL },
-  { "acute",                             600, NULL },
-  { "section",                           600, NULL },
-  { "dieresis",                          600, NULL },
-  { "iacute",                            600, NULL },
-  { "quotedblbase",                      600, NULL },
-  { "ncaron",                            600, NULL },
-  { "florin",                            600, NULL },
-  { "yacute",                            600, NULL },
-  { "Rcommaaccent",                      600, NULL },
-  { "fi",                                600, NULL },
-  { "fl",                                600, NULL },
-  { "Acircumflex",                       600, NULL },
-  { "Cacute",                            600, NULL },
-  { "Icircumflex",                       600, NULL },
-  { "guillemotleft",                     600, NULL },
-  { "germandbls",                        600, NULL },
-  { "Amacron",                           600, NULL },
-  { "seven",                             600, NULL },
-  { "Sacute",                            600, NULL },
-  { "ordmasculine",                      600, NULL },
-  { "dotlessi",                          600, NULL },
-  { "sterling",                          600, NULL },
-  { "notequal",                          600, NULL },
-  { "Imacron",                           600, NULL },
-  { "rcommaaccent",                      600, NULL },
-  { "Zdotaccent",                        600, NULL },
-  { "acircumflex",                       600, NULL },
-  { "cacute",                            600, NULL },
-  { "Ecaron",                            600, NULL },
-  { "icircumflex",                       600, NULL },
-  { "braceright",                        600, NULL },
-  { "quotedblright",                     600, NULL },
-  { "amacron",                           600, NULL },
-  { "sacute",                            600, NULL },
-  { "imacron",                           600, NULL },
-  { "cent",                              600, NULL },
-  { "currency",                          600, NULL },
-  { "logicalnot",                        600, NULL },
-  { "zdotaccent",                        600, NULL },
-  { "Atilde",                            600, NULL },
-  { "breve",                             600, NULL },
-  { "bar",                               600, NULL },
-  { "fraction",                          600, NULL },
-  { "less",                              600, NULL },
-  { "ecaron",                            600, NULL },
-  { "guilsinglleft",                     600, NULL },
-  { "exclam",                            600, NULL },
-  { "period",                            600, NULL },
-  { "Rcaron",                            600, NULL },
-  { "Kcommaaccent",                      600, NULL },
-  { "greater",                           600, NULL },
-  { "atilde",                            600, NULL },
-  { "brokenbar",                         600, NULL },
-  { "quoteleft",                         600, NULL },
-  { "Edotaccent",                        600, NULL },
-  { "onesuperior",                       600, NULL }
+  { "Ntilde",                            600, nullptr },
+  { "rcaron",                            600, nullptr },
+  { "kcommaaccent",                      600, nullptr },
+  { "Ncommaaccent",                      600, nullptr },
+  { "Zacute",                            600, nullptr },
+  { "comma",                             600, nullptr },
+  { "cedilla",                           600, nullptr },
+  { "plusminus",                         600, nullptr },
+  { "circumflex",                        600, nullptr },
+  { "dotaccent",                         600, nullptr },
+  { "edotaccent",                        600, nullptr },
+  { "asciitilde",                        600, nullptr },
+  { "colon",                             600, nullptr },
+  { "onehalf",                           600, nullptr },
+  { "dollar",                            600, nullptr },
+  { "Lcaron",                            600, nullptr },
+  { "ntilde",                            600, nullptr },
+  { "Aogonek",                           600, nullptr },
+  { "ncommaaccent",                      600, nullptr },
+  { "minus",                             600, nullptr },
+  { "Iogonek",                           600, nullptr },
+  { "zacute",                            600, nullptr },
+  { "yen",                               600, nullptr },
+  { "space",                             600, nullptr },
+  { "Omacron",                           600, nullptr },
+  { "questiondown",                      600, nullptr },
+  { "emdash",                            600, nullptr },
+  { "Agrave",                            600, nullptr },
+  { "three",                             600, nullptr },
+  { "numbersign",                        600, nullptr },
+  { "lcaron",                            600, nullptr },
+  { "A",                                 600, nullptr },
+  { "B",                                 600, nullptr },
+  { "C",                                 600, nullptr },
+  { "aogonek",                           600, nullptr },
+  { "D",                                 600, nullptr },
+  { "E",                                 600, nullptr },
+  { "onequarter",                        600, nullptr },
+  { "F",                                 600, nullptr },
+  { "G",                                 600, nullptr },
+  { "H",                                 600, nullptr },
+  { "I",                                 600, nullptr },
+  { "J",                                 600, nullptr },
+  { "K",                                 600, nullptr },
+  { "iogonek",                           600, nullptr },
+  { "backslash",                         600, nullptr },
+  { "L",                                 600, nullptr },
+  { "periodcentered",                    600, nullptr },
+  { "M",                                 600, nullptr },
+  { "N",                                 600, nullptr },
+  { "omacron",                           600, nullptr },
+  { "Tcommaaccent",                      600, nullptr },
+  { "O",                                 600, nullptr },
+  { "P",                                 600, nullptr },
+  { "Q",                                 600, nullptr },
+  { "Uhungarumlaut",                     600, nullptr },
+  { "R",                                 600, nullptr },
+  { "Aacute",                            600, nullptr },
+  { "caron",                             600, nullptr },
+  { "S",                                 600, nullptr },
+  { "T",                                 600, nullptr },
+  { "U",                                 600, nullptr },
+  { "agrave",                            600, nullptr },
+  { "V",                                 600, nullptr },
+  { "W",                                 600, nullptr },
+  { "X",                                 600, nullptr },
+  { "question",                          600, nullptr },
+  { "equal",                             600, nullptr },
+  { "Y",                                 600, nullptr },
+  { "Z",                                 600, nullptr },
+  { "four",                              600, nullptr },
+  { "a",                                 600, nullptr },
+  { "Gcommaaccent",                      600, nullptr },
+  { "b",                                 600, nullptr },
+  { "c",                                 600, nullptr },
+  { "d",                                 600, nullptr },
+  { "e",                                 600, nullptr },
+  { "f",                                 600, nullptr },
+  { "g",                                 600, nullptr },
+  { "bullet",                            600, nullptr },
+  { "h",                                 600, nullptr },
+  { "i",                                 600, nullptr },
+  { "Oslash",                            600, nullptr },
+  { "dagger",                            600, nullptr },
+  { "j",                                 600, nullptr },
+  { "k",                                 600, nullptr },
+  { "l",                                 600, nullptr },
+  { "m",                                 600, nullptr },
+  { "n",                                 600, nullptr },
+  { "tcommaaccent",                      600, nullptr },
+  { "o",                                 600, nullptr },
+  { "ordfeminine",                       600, nullptr },
+  { "ring",                              600, nullptr },
+  { "p",                                 600, nullptr },
+  { "q",                                 600, nullptr },
+  { "uhungarumlaut",                     600, nullptr },
+  { "r",                                 600, nullptr },
+  { "twosuperior",                       600, nullptr },
+  { "aacute",                            600, nullptr },
+  { "s",                                 600, nullptr },
+  { "OE",                                600, nullptr },
+  { "t",                                 600, nullptr },
+  { "divide",                            600, nullptr },
+  { "u",                                 600, nullptr },
+  { "Ccaron",                            600, nullptr },
+  { "v",                                 600, nullptr },
+  { "w",                                 600, nullptr },
+  { "x",                                 600, nullptr },
+  { "y",                                 600, nullptr },
+  { "z",                                 600, nullptr },
+  { "Gbreve",                            600, nullptr },
+  { "commaaccent",                       600, nullptr },
+  { "hungarumlaut",                      600, nullptr },
+  { "Idotaccent",                        600, nullptr },
+  { "Nacute",                            600, nullptr },
+  { "quotedbl",                          600, nullptr },
+  { "gcommaaccent",                      600, nullptr },
+  { "mu",                                600, nullptr },
+  { "greaterequal",                      600, nullptr },
+  { "Scaron",                            600, nullptr },
+  { "Lslash",                            600, nullptr },
+  { "semicolon",                         600, nullptr },
+  { "oslash",                            600, nullptr },
+  { "lessequal",                         600, nullptr },
+  { "lozenge",                           600, nullptr },
+  { "parenright",                        600, nullptr },
+  { "ccaron",                            600, nullptr },
+  { "Ecircumflex",                       600, nullptr },
+  { "gbreve",                            600, nullptr },
+  { "trademark",                         600, nullptr },
+  { "daggerdbl",                         600, nullptr },
+  { "nacute",                            600, nullptr },
+  { "macron",                            600, nullptr },
+  { "Otilde",                            600, nullptr },
+  { "Emacron",                           600, nullptr },
+  { "ellipsis",                          600, nullptr },
+  { "scaron",                            600, nullptr },
+  { "AE",                                600, nullptr },
+  { "Ucircumflex",                       600, nullptr },
+  { "lslash",                            600, nullptr },
+  { "quotedblleft",                      600, nullptr },
+  { "guilsinglright",                    600, nullptr },
+  { "hyphen",                            600, nullptr },
+  { "quotesingle",                       600, nullptr },
+  { "eight",                             600, nullptr },
+  { "exclamdown",                        600, nullptr },
+  { "endash",                            600, nullptr },
+  { "oe",                                600, nullptr },
+  { "Abreve",                            600, nullptr },
+  { "Umacron",                           600, nullptr },
+  { "ecircumflex",                       600, nullptr },
+  { "Adieresis",                         600, nullptr },
+  { "copyright",                         600, nullptr },
+  { "Egrave",                            600, nullptr },
+  { "slash",                             600, nullptr },
+  { "Edieresis",                         600, nullptr },
+  { "otilde",                            600, nullptr },
+  { "Idieresis",                         600, nullptr },
+  { "parenleft",                         600, nullptr },
+  { "one",                               600, nullptr },
+  { "emacron",                           600, nullptr },
+  { "Odieresis",                         600, nullptr },
+  { "ucircumflex",                       600, nullptr },
+  { "bracketleft",                       600, nullptr },
+  { "Ugrave",                            600, nullptr },
+  { "quoteright",                        600, nullptr },
+  { "Udieresis",                         600, nullptr },
+  { "perthousand",                       600, nullptr },
+  { "Ydieresis",                         600, nullptr },
+  { "umacron",                           600, nullptr },
+  { "abreve",                            600, nullptr },
+  { "Eacute",                            600, nullptr },
+  { "adieresis",                         600, nullptr },
+  { "egrave",                            600, nullptr },
+  { "edieresis",                         600, nullptr },
+  { "idieresis",                         600, nullptr },
+  { "Eth",                               600, nullptr },
+  { "ae",                                600, nullptr },
+  { "asterisk",                          600, nullptr },
+  { "odieresis",                         600, nullptr },
+  { "Uacute",                            600, nullptr },
+  { "ugrave",                            600, nullptr },
+  { "nine",                              600, nullptr },
+  { "five",                              600, nullptr },
+  { "udieresis",                         600, nullptr },
+  { "Zcaron",                            600, nullptr },
+  { "Scommaaccent",                      600, nullptr },
+  { "threequarters",                     600, nullptr },
+  { "guillemotright",                    600, nullptr },
+  { "Ccedilla",                          600, nullptr },
+  { "ydieresis",                         600, nullptr },
+  { "tilde",                             600, nullptr },
+  { "at",                                600, nullptr },
+  { "eacute",                            600, nullptr },
+  { "underscore",                        600, nullptr },
+  { "Euro",                              600, nullptr },
+  { "Dcroat",                            600, nullptr },
+  { "multiply",                          600, nullptr },
+  { "zero",                              600, nullptr },
+  { "eth",                               600, nullptr },
+  { "Scedilla",                          600, nullptr },
+  { "Ograve",                            600, nullptr },
+  { "Racute",                            600, nullptr },
+  { "partialdiff",                       600, nullptr },
+  { "uacute",                            600, nullptr },
+  { "braceleft",                         600, nullptr },
+  { "Thorn",                             600, nullptr },
+  { "zcaron",                            600, nullptr },
+  { "scommaaccent",                      600, nullptr },
+  { "ccedilla",                          600, nullptr },
+  { "Dcaron",                            600, nullptr },
+  { "dcroat",                            600, nullptr },
+  { "Ocircumflex",                       600, nullptr },
+  { "Oacute",                            600, nullptr },
+  { "scedilla",                          600, nullptr },
+  { "ogonek",                            600, nullptr },
+  { "ograve",                            600, nullptr },
+  { "racute",                            600, nullptr },
+  { "Tcaron",                            600, nullptr },
+  { "Eogonek",                           600, nullptr },
+  { "thorn",                             600, nullptr },
+  { "degree",                            600, nullptr },
+  { "registered",                        600, nullptr },
+  { "radical",                           600, nullptr },
+  { "Aring",                             600, nullptr },
+  { "percent",                           600, nullptr },
+  { "six",                               600, nullptr },
+  { "paragraph",                         600, nullptr },
+  { "dcaron",                            600, nullptr },
+  { "Uogonek",                           600, nullptr },
+  { "two",                               600, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            600, nullptr },
+  { "Lacute",                            600, nullptr },
+  { "ocircumflex",                       600, nullptr },
+  { "oacute",                            600, nullptr },
+  { "Uring",                             600, nullptr },
+  { "Lcommaaccent",                      600, nullptr },
+  { "tcaron",                            600, nullptr },
+  { "eogonek",                           600, nullptr },
+  { "Delta",                             600, nullptr },
+  { "Ohungarumlaut",                     600, nullptr },
+  { "asciicircum",                       600, nullptr },
+  { "aring",                             600, nullptr },
+  { "grave",                             600, nullptr },
+  { "uogonek",                           600, nullptr },
+  { "bracketright",                      600, nullptr },
+  { "Iacute",                            600, nullptr },
+  { "ampersand",                         600, nullptr },
+  { "igrave",                            600, nullptr },
+  { "lacute",                            600, nullptr },
+  { "Ncaron",                            600, nullptr },
+  { "plus",                              600, nullptr },
+  { "uring",                             600, nullptr },
+  { "quotesinglbase",                    600, nullptr },
+  { "lcommaaccent",                      600, nullptr },
+  { "Yacute",                            600, nullptr },
+  { "ohungarumlaut",                     600, nullptr },
+  { "threesuperior",                     600, nullptr },
+  { "acute",                             600, nullptr },
+  { "section",                           600, nullptr },
+  { "dieresis",                          600, nullptr },
+  { "iacute",                            600, nullptr },
+  { "quotedblbase",                      600, nullptr },
+  { "ncaron",                            600, nullptr },
+  { "florin",                            600, nullptr },
+  { "yacute",                            600, nullptr },
+  { "Rcommaaccent",                      600, nullptr },
+  { "fi",                                600, nullptr },
+  { "fl",                                600, nullptr },
+  { "Acircumflex",                       600, nullptr },
+  { "Cacute",                            600, nullptr },
+  { "Icircumflex",                       600, nullptr },
+  { "guillemotleft",                     600, nullptr },
+  { "germandbls",                        600, nullptr },
+  { "Amacron",                           600, nullptr },
+  { "seven",                             600, nullptr },
+  { "Sacute",                            600, nullptr },
+  { "ordmasculine",                      600, nullptr },
+  { "dotlessi",                          600, nullptr },
+  { "sterling",                          600, nullptr },
+  { "notequal",                          600, nullptr },
+  { "Imacron",                           600, nullptr },
+  { "rcommaaccent",                      600, nullptr },
+  { "Zdotaccent",                        600, nullptr },
+  { "acircumflex",                       600, nullptr },
+  { "cacute",                            600, nullptr },
+  { "Ecaron",                            600, nullptr },
+  { "icircumflex",                       600, nullptr },
+  { "braceright",                        600, nullptr },
+  { "quotedblright",                     600, nullptr },
+  { "amacron",                           600, nullptr },
+  { "sacute",                            600, nullptr },
+  { "imacron",                           600, nullptr },
+  { "cent",                              600, nullptr },
+  { "currency",                          600, nullptr },
+  { "logicalnot",                        600, nullptr },
+  { "zdotaccent",                        600, nullptr },
+  { "Atilde",                            600, nullptr },
+  { "breve",                             600, nullptr },
+  { "bar",                               600, nullptr },
+  { "fraction",                          600, nullptr },
+  { "less",                              600, nullptr },
+  { "ecaron",                            600, nullptr },
+  { "guilsinglleft",                     600, nullptr },
+  { "exclam",                            600, nullptr },
+  { "period",                            600, nullptr },
+  { "Rcaron",                            600, nullptr },
+  { "Kcommaaccent",                      600, nullptr },
+  { "greater",                           600, nullptr },
+  { "atilde",                            600, nullptr },
+  { "brokenbar",                         600, nullptr },
+  { "quoteleft",                         600, nullptr },
+  { "Edotaccent",                        600, nullptr },
+  { "onesuperior",                       600, nullptr }
 };
 
 static BuiltinFontWidth courierObliqueWidthsTab[] = {
-  { "Ntilde",                            600, NULL },
-  { "rcaron",                            600, NULL },
-  { "kcommaaccent",                      600, NULL },
-  { "Ncommaaccent",                      600, NULL },
-  { "Zacute",                            600, NULL },
-  { "comma",                             600, NULL },
-  { "cedilla",                           600, NULL },
-  { "plusminus",                         600, NULL },
-  { "circumflex",                        600, NULL },
-  { "dotaccent",                         600, NULL },
-  { "edotaccent",                        600, NULL },
-  { "asciitilde",                        600, NULL },
-  { "colon",                             600, NULL },
-  { "onehalf",                           600, NULL },
-  { "dollar",                            600, NULL },
-  { "Lcaron",                            600, NULL },
-  { "ntilde",                            600, NULL },
-  { "Aogonek",                           600, NULL },
-  { "ncommaaccent",                      600, NULL },
-  { "minus",                             600, NULL },
-  { "Iogonek",                           600, NULL },
-  { "zacute",                            600, NULL },
-  { "yen",                               600, NULL },
-  { "space",                             600, NULL },
-  { "Omacron",                           600, NULL },
-  { "questiondown",                      600, NULL },
-  { "emdash",                            600, NULL },
-  { "Agrave",                            600, NULL },
-  { "three",                             600, NULL },
-  { "numbersign",                        600, NULL },
-  { "lcaron",                            600, NULL },
-  { "A",                                 600, NULL },
-  { "B",                                 600, NULL },
-  { "C",                                 600, NULL },
-  { "aogonek",                           600, NULL },
-  { "D",                                 600, NULL },
-  { "E",                                 600, NULL },
-  { "onequarter",                        600, NULL },
-  { "F",                                 600, NULL },
-  { "G",                                 600, NULL },
-  { "H",                                 600, NULL },
-  { "I",                                 600, NULL },
-  { "J",                                 600, NULL },
-  { "K",                                 600, NULL },
-  { "iogonek",                           600, NULL },
-  { "backslash",                         600, NULL },
-  { "L",                                 600, NULL },
-  { "periodcentered",                    600, NULL },
-  { "M",                                 600, NULL },
-  { "N",                                 600, NULL },
-  { "omacron",                           600, NULL },
-  { "Tcommaaccent",                      600, NULL },
-  { "O",                                 600, NULL },
-  { "P",                                 600, NULL },
-  { "Q",                                 600, NULL },
-  { "Uhungarumlaut",                     600, NULL },
-  { "R",                                 600, NULL },
-  { "Aacute",                            600, NULL },
-  { "caron",                             600, NULL },
-  { "S",                                 600, NULL },
-  { "T",                                 600, NULL },
-  { "U",                                 600, NULL },
-  { "agrave",                            600, NULL },
-  { "V",                                 600, NULL },
-  { "W",                                 600, NULL },
-  { "X",                                 600, NULL },
-  { "question",                          600, NULL },
-  { "equal",                             600, NULL },
-  { "Y",                                 600, NULL },
-  { "Z",                                 600, NULL },
-  { "four",                              600, NULL },
-  { "a",                                 600, NULL },
-  { "Gcommaaccent",                      600, NULL },
-  { "b",                                 600, NULL },
-  { "c",                                 600, NULL },
-  { "d",                                 600, NULL },
-  { "e",                                 600, NULL },
-  { "f",                                 600, NULL },
-  { "g",                                 600, NULL },
-  { "bullet",                            600, NULL },
-  { "h",                                 600, NULL },
-  { "i",                                 600, NULL },
-  { "Oslash",                            600, NULL },
-  { "dagger",                            600, NULL },
-  { "j",                                 600, NULL },
-  { "k",                                 600, NULL },
-  { "l",                                 600, NULL },
-  { "m",                                 600, NULL },
-  { "n",                                 600, NULL },
-  { "tcommaaccent",                      600, NULL },
-  { "o",                                 600, NULL },
-  { "ordfeminine",                       600, NULL },
-  { "ring",                              600, NULL },
-  { "p",                                 600, NULL },
-  { "q",                                 600, NULL },
-  { "uhungarumlaut",                     600, NULL },
-  { "r",                                 600, NULL },
-  { "twosuperior",                       600, NULL },
-  { "aacute",                            600, NULL },
-  { "s",                                 600, NULL },
-  { "OE",                                600, NULL },
-  { "t",                                 600, NULL },
-  { "divide",                            600, NULL },
-  { "u",                                 600, NULL },
-  { "Ccaron",                            600, NULL },
-  { "v",                                 600, NULL },
-  { "w",                                 600, NULL },
-  { "x",                                 600, NULL },
-  { "y",                                 600, NULL },
-  { "z",                                 600, NULL },
-  { "Gbreve",                            600, NULL },
-  { "commaaccent",                       600, NULL },
-  { "hungarumlaut",                      600, NULL },
-  { "Idotaccent",                        600, NULL },
-  { "Nacute",                            600, NULL },
-  { "quotedbl",                          600, NULL },
-  { "gcommaaccent",                      600, NULL },
-  { "mu",                                600, NULL },
-  { "greaterequal",                      600, NULL },
-  { "Scaron",                            600, NULL },
-  { "Lslash",                            600, NULL },
-  { "semicolon",                         600, NULL },
-  { "oslash",                            600, NULL },
-  { "lessequal",                         600, NULL },
-  { "lozenge",                           600, NULL },
-  { "parenright",                        600, NULL },
-  { "ccaron",                            600, NULL },
-  { "Ecircumflex",                       600, NULL },
-  { "gbreve",                            600, NULL },
-  { "trademark",                         600, NULL },
-  { "daggerdbl",                         600, NULL },
-  { "nacute",                            600, NULL },
-  { "macron",                            600, NULL },
-  { "Otilde",                            600, NULL },
-  { "Emacron",                           600, NULL },
-  { "ellipsis",                          600, NULL },
-  { "scaron",                            600, NULL },
-  { "AE",                                600, NULL },
-  { "Ucircumflex",                       600, NULL },
-  { "lslash",                            600, NULL },
-  { "quotedblleft",                      600, NULL },
-  { "guilsinglright",                    600, NULL },
-  { "hyphen",                            600, NULL },
-  { "quotesingle",                       600, NULL },
-  { "eight",                             600, NULL },
-  { "exclamdown",                        600, NULL },
-  { "endash",                            600, NULL },
-  { "oe",                                600, NULL },
-  { "Abreve",                            600, NULL },
-  { "Umacron",                           600, NULL },
-  { "ecircumflex",                       600, NULL },
-  { "Adieresis",                         600, NULL },
-  { "copyright",                         600, NULL },
-  { "Egrave",                            600, NULL },
-  { "slash",                             600, NULL },
-  { "Edieresis",                         600, NULL },
-  { "otilde",                            600, NULL },
-  { "Idieresis",                         600, NULL },
-  { "parenleft",                         600, NULL },
-  { "one",                               600, NULL },
-  { "emacron",                           600, NULL },
-  { "Odieresis",                         600, NULL },
-  { "ucircumflex",                       600, NULL },
-  { "bracketleft",                       600, NULL },
-  { "Ugrave",                            600, NULL },
-  { "quoteright",                        600, NULL },
-  { "Udieresis",                         600, NULL },
-  { "perthousand",                       600, NULL },
-  { "Ydieresis",                         600, NULL },
-  { "umacron",                           600, NULL },
-  { "abreve",                            600, NULL },
-  { "Eacute",                            600, NULL },
-  { "adieresis",                         600, NULL },
-  { "egrave",                            600, NULL },
-  { "edieresis",                         600, NULL },
-  { "idieresis",                         600, NULL },
-  { "Eth",                               600, NULL },
-  { "ae",                                600, NULL },
-  { "asterisk",                          600, NULL },
-  { "odieresis",                         600, NULL },
-  { "Uacute",                            600, NULL },
-  { "ugrave",                            600, NULL },
-  { "nine",                              600, NULL },
-  { "five",                              600, NULL },
-  { "udieresis",                         600, NULL },
-  { "Zcaron",                            600, NULL },
-  { "Scommaaccent",                      600, NULL },
-  { "threequarters",                     600, NULL },
-  { "guillemotright",                    600, NULL },
-  { "Ccedilla",                          600, NULL },
-  { "ydieresis",                         600, NULL },
-  { "tilde",                             600, NULL },
-  { "at",                                600, NULL },
-  { "eacute",                            600, NULL },
-  { "underscore",                        600, NULL },
-  { "Euro",                              600, NULL },
-  { "Dcroat",                            600, NULL },
-  { "multiply",                          600, NULL },
-  { "zero",                              600, NULL },
-  { "eth",                               600, NULL },
-  { "Scedilla",                          600, NULL },
-  { "Ograve",                            600, NULL },
-  { "Racute",                            600, NULL },
-  { "partialdiff",                       600, NULL },
-  { "uacute",                            600, NULL },
-  { "braceleft",                         600, NULL },
-  { "Thorn",                             600, NULL },
-  { "zcaron",                            600, NULL },
-  { "scommaaccent",                      600, NULL },
-  { "ccedilla",                          600, NULL },
-  { "Dcaron",                            600, NULL },
-  { "dcroat",                            600, NULL },
-  { "Ocircumflex",                       600, NULL },
-  { "Oacute",                            600, NULL },
-  { "scedilla",                          600, NULL },
-  { "ogonek",                            600, NULL },
-  { "ograve",                            600, NULL },
-  { "racute",                            600, NULL },
-  { "Tcaron",                            600, NULL },
-  { "Eogonek",                           600, NULL },
-  { "thorn",                             600, NULL },
-  { "degree",                            600, NULL },
-  { "registered",                        600, NULL },
-  { "radical",                           600, NULL },
-  { "Aring",                             600, NULL },
-  { "percent",                           600, NULL },
-  { "six",                               600, NULL },
-  { "paragraph",                         600, NULL },
-  { "dcaron",                            600, NULL },
-  { "Uogonek",                           600, NULL },
-  { "two",                               600, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            600, NULL },
-  { "Lacute",                            600, NULL },
-  { "ocircumflex",                       600, NULL },
-  { "oacute",                            600, NULL },
-  { "Uring",                             600, NULL },
-  { "Lcommaaccent",                      600, NULL },
-  { "tcaron",                            600, NULL },
-  { "eogonek",                           600, NULL },
-  { "Delta",                             600, NULL },
-  { "Ohungarumlaut",                     600, NULL },
-  { "asciicircum",                       600, NULL },
-  { "aring",                             600, NULL },
-  { "grave",                             600, NULL },
-  { "uogonek",                           600, NULL },
-  { "bracketright",                      600, NULL },
-  { "Iacute",                            600, NULL },
-  { "ampersand",                         600, NULL },
-  { "igrave",                            600, NULL },
-  { "lacute",                            600, NULL },
-  { "Ncaron",                            600, NULL },
-  { "plus",                              600, NULL },
-  { "uring",                             600, NULL },
-  { "quotesinglbase",                    600, NULL },
-  { "lcommaaccent",                      600, NULL },
-  { "Yacute",                            600, NULL },
-  { "ohungarumlaut",                     600, NULL },
-  { "threesuperior",                     600, NULL },
-  { "acute",                             600, NULL },
-  { "section",                           600, NULL },
-  { "dieresis",                          600, NULL },
-  { "iacute",                            600, NULL },
-  { "quotedblbase",                      600, NULL },
-  { "ncaron",                            600, NULL },
-  { "florin",                            600, NULL },
-  { "yacute",                            600, NULL },
-  { "Rcommaaccent",                      600, NULL },
-  { "fi",                                600, NULL },
-  { "fl",                                600, NULL },
-  { "Acircumflex",                       600, NULL },
-  { "Cacute",                            600, NULL },
-  { "Icircumflex",                       600, NULL },
-  { "guillemotleft",                     600, NULL },
-  { "germandbls",                        600, NULL },
-  { "Amacron",                           600, NULL },
-  { "seven",                             600, NULL },
-  { "Sacute",                            600, NULL },
-  { "ordmasculine",                      600, NULL },
-  { "dotlessi",                          600, NULL },
-  { "sterling",                          600, NULL },
-  { "notequal",                          600, NULL },
-  { "Imacron",                           600, NULL },
-  { "rcommaaccent",                      600, NULL },
-  { "Zdotaccent",                        600, NULL },
-  { "acircumflex",                       600, NULL },
-  { "cacute",                            600, NULL },
-  { "Ecaron",                            600, NULL },
-  { "icircumflex",                       600, NULL },
-  { "braceright",                        600, NULL },
-  { "quotedblright",                     600, NULL },
-  { "amacron",                           600, NULL },
-  { "sacute",                            600, NULL },
-  { "imacron",                           600, NULL },
-  { "cent",                              600, NULL },
-  { "currency",                          600, NULL },
-  { "logicalnot",                        600, NULL },
-  { "zdotaccent",                        600, NULL },
-  { "Atilde",                            600, NULL },
-  { "breve",                             600, NULL },
-  { "bar",                               600, NULL },
-  { "fraction",                          600, NULL },
-  { "less",                              600, NULL },
-  { "ecaron",                            600, NULL },
-  { "guilsinglleft",                     600, NULL },
-  { "exclam",                            600, NULL },
-  { "period",                            600, NULL },
-  { "Rcaron",                            600, NULL },
-  { "Kcommaaccent",                      600, NULL },
-  { "greater",                           600, NULL },
-  { "atilde",                            600, NULL },
-  { "brokenbar",                         600, NULL },
-  { "quoteleft",                         600, NULL },
-  { "Edotaccent",                        600, NULL },
-  { "onesuperior",                       600, NULL }
+  { "Ntilde",                            600, nullptr },
+  { "rcaron",                            600, nullptr },
+  { "kcommaaccent",                      600, nullptr },
+  { "Ncommaaccent",                      600, nullptr },
+  { "Zacute",                            600, nullptr },
+  { "comma",                             600, nullptr },
+  { "cedilla",                           600, nullptr },
+  { "plusminus",                         600, nullptr },
+  { "circumflex",                        600, nullptr },
+  { "dotaccent",                         600, nullptr },
+  { "edotaccent",                        600, nullptr },
+  { "asciitilde",                        600, nullptr },
+  { "colon",                             600, nullptr },
+  { "onehalf",                           600, nullptr },
+  { "dollar",                            600, nullptr },
+  { "Lcaron",                            600, nullptr },
+  { "ntilde",                            600, nullptr },
+  { "Aogonek",                           600, nullptr },
+  { "ncommaaccent",                      600, nullptr },
+  { "minus",                             600, nullptr },
+  { "Iogonek",                           600, nullptr },
+  { "zacute",                            600, nullptr },
+  { "yen",                               600, nullptr },
+  { "space",                             600, nullptr },
+  { "Omacron",                           600, nullptr },
+  { "questiondown",                      600, nullptr },
+  { "emdash",                            600, nullptr },
+  { "Agrave",                            600, nullptr },
+  { "three",                             600, nullptr },
+  { "numbersign",                        600, nullptr },
+  { "lcaron",                            600, nullptr },
+  { "A",                                 600, nullptr },
+  { "B",                                 600, nullptr },
+  { "C",                                 600, nullptr },
+  { "aogonek",                           600, nullptr },
+  { "D",                                 600, nullptr },
+  { "E",                                 600, nullptr },
+  { "onequarter",                        600, nullptr },
+  { "F",                                 600, nullptr },
+  { "G",                                 600, nullptr },
+  { "H",                                 600, nullptr },
+  { "I",                                 600, nullptr },
+  { "J",                                 600, nullptr },
+  { "K",                                 600, nullptr },
+  { "iogonek",                           600, nullptr },
+  { "backslash",                         600, nullptr },
+  { "L",                                 600, nullptr },
+  { "periodcentered",                    600, nullptr },
+  { "M",                                 600, nullptr },
+  { "N",                                 600, nullptr },
+  { "omacron",                           600, nullptr },
+  { "Tcommaaccent",                      600, nullptr },
+  { "O",                                 600, nullptr },
+  { "P",                                 600, nullptr },
+  { "Q",                                 600, nullptr },
+  { "Uhungarumlaut",                     600, nullptr },
+  { "R",                                 600, nullptr },
+  { "Aacute",                            600, nullptr },
+  { "caron",                             600, nullptr },
+  { "S",                                 600, nullptr },
+  { "T",                                 600, nullptr },
+  { "U",                                 600, nullptr },
+  { "agrave",                            600, nullptr },
+  { "V",                                 600, nullptr },
+  { "W",                                 600, nullptr },
+  { "X",                                 600, nullptr },
+  { "question",                          600, nullptr },
+  { "equal",                             600, nullptr },
+  { "Y",                                 600, nullptr },
+  { "Z",                                 600, nullptr },
+  { "four",                              600, nullptr },
+  { "a",                                 600, nullptr },
+  { "Gcommaaccent",                      600, nullptr },
+  { "b",                                 600, nullptr },
+  { "c",                                 600, nullptr },
+  { "d",                                 600, nullptr },
+  { "e",                                 600, nullptr },
+  { "f",                                 600, nullptr },
+  { "g",                                 600, nullptr },
+  { "bullet",                            600, nullptr },
+  { "h",                                 600, nullptr },
+  { "i",                                 600, nullptr },
+  { "Oslash",                            600, nullptr },
+  { "dagger",                            600, nullptr },
+  { "j",                                 600, nullptr },
+  { "k",                                 600, nullptr },
+  { "l",                                 600, nullptr },
+  { "m",                                 600, nullptr },
+  { "n",                                 600, nullptr },
+  { "tcommaaccent",                      600, nullptr },
+  { "o",                                 600, nullptr },
+  { "ordfeminine",                       600, nullptr },
+  { "ring",                              600, nullptr },
+  { "p",                                 600, nullptr },
+  { "q",                                 600, nullptr },
+  { "uhungarumlaut",                     600, nullptr },
+  { "r",                                 600, nullptr },
+  { "twosuperior",                       600, nullptr },
+  { "aacute",                            600, nullptr },
+  { "s",                                 600, nullptr },
+  { "OE",                                600, nullptr },
+  { "t",                                 600, nullptr },
+  { "divide",                            600, nullptr },
+  { "u",                                 600, nullptr },
+  { "Ccaron",                            600, nullptr },
+  { "v",                                 600, nullptr },
+  { "w",                                 600, nullptr },
+  { "x",                                 600, nullptr },
+  { "y",                                 600, nullptr },
+  { "z",                                 600, nullptr },
+  { "Gbreve",                            600, nullptr },
+  { "commaaccent",                       600, nullptr },
+  { "hungarumlaut",                      600, nullptr },
+  { "Idotaccent",                        600, nullptr },
+  { "Nacute",                            600, nullptr },
+  { "quotedbl",                          600, nullptr },
+  { "gcommaaccent",                      600, nullptr },
+  { "mu",                                600, nullptr },
+  { "greaterequal",                      600, nullptr },
+  { "Scaron",                            600, nullptr },
+  { "Lslash",                            600, nullptr },
+  { "semicolon",                         600, nullptr },
+  { "oslash",                            600, nullptr },
+  { "lessequal",                         600, nullptr },
+  { "lozenge",                           600, nullptr },
+  { "parenright",                        600, nullptr },
+  { "ccaron",                            600, nullptr },
+  { "Ecircumflex",                       600, nullptr },
+  { "gbreve",                            600, nullptr },
+  { "trademark",                         600, nullptr },
+  { "daggerdbl",                         600, nullptr },
+  { "nacute",                            600, nullptr },
+  { "macron",                            600, nullptr },
+  { "Otilde",                            600, nullptr },
+  { "Emacron",                           600, nullptr },
+  { "ellipsis",                          600, nullptr },
+  { "scaron",                            600, nullptr },
+  { "AE",                                600, nullptr },
+  { "Ucircumflex",                       600, nullptr },
+  { "lslash",                            600, nullptr },
+  { "quotedblleft",                      600, nullptr },
+  { "guilsinglright",                    600, nullptr },
+  { "hyphen",                            600, nullptr },
+  { "quotesingle",                       600, nullptr },
+  { "eight",                             600, nullptr },
+  { "exclamdown",                        600, nullptr },
+  { "endash",                            600, nullptr },
+  { "oe",                                600, nullptr },
+  { "Abreve",                            600, nullptr },
+  { "Umacron",                           600, nullptr },
+  { "ecircumflex",                       600, nullptr },
+  { "Adieresis",                         600, nullptr },
+  { "copyright",                         600, nullptr },
+  { "Egrave",                            600, nullptr },
+  { "slash",                             600, nullptr },
+  { "Edieresis",                         600, nullptr },
+  { "otilde",                            600, nullptr },
+  { "Idieresis",                         600, nullptr },
+  { "parenleft",                         600, nullptr },
+  { "one",                               600, nullptr },
+  { "emacron",                           600, nullptr },
+  { "Odieresis",                         600, nullptr },
+  { "ucircumflex",                       600, nullptr },
+  { "bracketleft",                       600, nullptr },
+  { "Ugrave",                            600, nullptr },
+  { "quoteright",                        600, nullptr },
+  { "Udieresis",                         600, nullptr },
+  { "perthousand",                       600, nullptr },
+  { "Ydieresis",                         600, nullptr },
+  { "umacron",                           600, nullptr },
+  { "abreve",                            600, nullptr },
+  { "Eacute",                            600, nullptr },
+  { "adieresis",                         600, nullptr },
+  { "egrave",                            600, nullptr },
+  { "edieresis",                         600, nullptr },
+  { "idieresis",                         600, nullptr },
+  { "Eth",                               600, nullptr },
+  { "ae",                                600, nullptr },
+  { "asterisk",                          600, nullptr },
+  { "odieresis",                         600, nullptr },
+  { "Uacute",                            600, nullptr },
+  { "ugrave",                            600, nullptr },
+  { "nine",                              600, nullptr },
+  { "five",                              600, nullptr },
+  { "udieresis",                         600, nullptr },
+  { "Zcaron",                            600, nullptr },
+  { "Scommaaccent",                      600, nullptr },
+  { "threequarters",                     600, nullptr },
+  { "guillemotright",                    600, nullptr },
+  { "Ccedilla",                          600, nullptr },
+  { "ydieresis",                         600, nullptr },
+  { "tilde",                             600, nullptr },
+  { "at",                                600, nullptr },
+  { "eacute",                            600, nullptr },
+  { "underscore",                        600, nullptr },
+  { "Euro",                              600, nullptr },
+  { "Dcroat",                            600, nullptr },
+  { "multiply",                          600, nullptr },
+  { "zero",                              600, nullptr },
+  { "eth",                               600, nullptr },
+  { "Scedilla",                          600, nullptr },
+  { "Ograve",                            600, nullptr },
+  { "Racute",                            600, nullptr },
+  { "partialdiff",                       600, nullptr },
+  { "uacute",                            600, nullptr },
+  { "braceleft",                         600, nullptr },
+  { "Thorn",                             600, nullptr },
+  { "zcaron",                            600, nullptr },
+  { "scommaaccent",                      600, nullptr },
+  { "ccedilla",                          600, nullptr },
+  { "Dcaron",                            600, nullptr },
+  { "dcroat",                            600, nullptr },
+  { "Ocircumflex",                       600, nullptr },
+  { "Oacute",                            600, nullptr },
+  { "scedilla",                          600, nullptr },
+  { "ogonek",                            600, nullptr },
+  { "ograve",                            600, nullptr },
+  { "racute",                            600, nullptr },
+  { "Tcaron",                            600, nullptr },
+  { "Eogonek",                           600, nullptr },
+  { "thorn",                             600, nullptr },
+  { "degree",                            600, nullptr },
+  { "registered",                        600, nullptr },
+  { "radical",                           600, nullptr },
+  { "Aring",                             600, nullptr },
+  { "percent",                           600, nullptr },
+  { "six",                               600, nullptr },
+  { "paragraph",                         600, nullptr },
+  { "dcaron",                            600, nullptr },
+  { "Uogonek",                           600, nullptr },
+  { "two",                               600, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            600, nullptr },
+  { "Lacute",                            600, nullptr },
+  { "ocircumflex",                       600, nullptr },
+  { "oacute",                            600, nullptr },
+  { "Uring",                             600, nullptr },
+  { "Lcommaaccent",                      600, nullptr },
+  { "tcaron",                            600, nullptr },
+  { "eogonek",                           600, nullptr },
+  { "Delta",                             600, nullptr },
+  { "Ohungarumlaut",                     600, nullptr },
+  { "asciicircum",                       600, nullptr },
+  { "aring",                             600, nullptr },
+  { "grave",                             600, nullptr },
+  { "uogonek",                           600, nullptr },
+  { "bracketright",                      600, nullptr },
+  { "Iacute",                            600, nullptr },
+  { "ampersand",                         600, nullptr },
+  { "igrave",                            600, nullptr },
+  { "lacute",                            600, nullptr },
+  { "Ncaron",                            600, nullptr },
+  { "plus",                              600, nullptr },
+  { "uring",                             600, nullptr },
+  { "quotesinglbase",                    600, nullptr },
+  { "lcommaaccent",                      600, nullptr },
+  { "Yacute",                            600, nullptr },
+  { "ohungarumlaut",                     600, nullptr },
+  { "threesuperior",                     600, nullptr },
+  { "acute",                             600, nullptr },
+  { "section",                           600, nullptr },
+  { "dieresis",                          600, nullptr },
+  { "iacute",                            600, nullptr },
+  { "quotedblbase",                      600, nullptr },
+  { "ncaron",                            600, nullptr },
+  { "florin",                            600, nullptr },
+  { "yacute",                            600, nullptr },
+  { "Rcommaaccent",                      600, nullptr },
+  { "fi",                                600, nullptr },
+  { "fl",                                600, nullptr },
+  { "Acircumflex",                       600, nullptr },
+  { "Cacute",                            600, nullptr },
+  { "Icircumflex",                       600, nullptr },
+  { "guillemotleft",                     600, nullptr },
+  { "germandbls",                        600, nullptr },
+  { "Amacron",                           600, nullptr },
+  { "seven",                             600, nullptr },
+  { "Sacute",                            600, nullptr },
+  { "ordmasculine",                      600, nullptr },
+  { "dotlessi",                          600, nullptr },
+  { "sterling",                          600, nullptr },
+  { "notequal",                          600, nullptr },
+  { "Imacron",                           600, nullptr },
+  { "rcommaaccent",                      600, nullptr },
+  { "Zdotaccent",                        600, nullptr },
+  { "acircumflex",                       600, nullptr },
+  { "cacute",                            600, nullptr },
+  { "Ecaron",                            600, nullptr },
+  { "icircumflex",                       600, nullptr },
+  { "braceright",                        600, nullptr },
+  { "quotedblright",                     600, nullptr },
+  { "amacron",                           600, nullptr },
+  { "sacute",                            600, nullptr },
+  { "imacron",                           600, nullptr },
+  { "cent",                              600, nullptr },
+  { "currency",                          600, nullptr },
+  { "logicalnot",                        600, nullptr },
+  { "zdotaccent",                        600, nullptr },
+  { "Atilde",                            600, nullptr },
+  { "breve",                             600, nullptr },
+  { "bar",                               600, nullptr },
+  { "fraction",                          600, nullptr },
+  { "less",                              600, nullptr },
+  { "ecaron",                            600, nullptr },
+  { "guilsinglleft",                     600, nullptr },
+  { "exclam",                            600, nullptr },
+  { "period",                            600, nullptr },
+  { "Rcaron",                            600, nullptr },
+  { "Kcommaaccent",                      600, nullptr },
+  { "greater",                           600, nullptr },
+  { "atilde",                            600, nullptr },
+  { "brokenbar",                         600, nullptr },
+  { "quoteleft",                         600, nullptr },
+  { "Edotaccent",                        600, nullptr },
+  { "onesuperior",                       600, nullptr }
 };
 
 static BuiltinFontWidth helveticaWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            333, NULL },
-  { "kcommaaccent",                      500, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             278, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         584, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        556, NULL },
-  { "asciitilde",                        584, NULL },
-  { "colon",                             278, NULL },
-  { "onehalf",                           834, NULL },
-  { "dollar",                            556, NULL },
-  { "Lcaron",                            556, NULL },
-  { "ntilde",                            556, NULL },
-  { "Aogonek",                           667, NULL },
-  { "ncommaaccent",                      556, NULL },
-  { "minus",                             584, NULL },
-  { "Iogonek",                           278, NULL },
-  { "zacute",                            500, NULL },
-  { "yen",                               556, NULL },
-  { "space",                             278, NULL },
-  { "Omacron",                           778, NULL },
-  { "questiondown",                      611, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            667, NULL },
-  { "three",                             556, NULL },
-  { "numbersign",                        556, NULL },
-  { "lcaron",                            299, NULL },
-  { "A",                                 667, NULL },
-  { "B",                                 667, NULL },
-  { "C",                                 722, NULL },
-  { "aogonek",                           556, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        834, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 778, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 278, NULL },
-  { "J",                                 500, NULL },
-  { "K",                                 667, NULL },
-  { "iogonek",                           222, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 556, NULL },
-  { "periodcentered",                    278, NULL },
-  { "M",                                 833, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           556, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 778, NULL },
-  { "P",                                 667, NULL },
-  { "Q",                                 778, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 722, NULL },
-  { "Aacute",                            667, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 667, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            556, NULL },
-  { "V",                                 667, NULL },
-  { "W",                                 944, NULL },
-  { "X",                                 667, NULL },
-  { "question",                          556, NULL },
-  { "equal",                             584, NULL },
-  { "Y",                                 667, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              556, NULL },
-  { "a",                                 556, NULL },
-  { "Gcommaaccent",                      778, NULL },
-  { "b",                                 556, NULL },
-  { "c",                                 500, NULL },
-  { "d",                                 556, NULL },
-  { "e",                                 556, NULL },
-  { "f",                                 278, NULL },
-  { "g",                                 556, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 556, NULL },
-  { "i",                                 222, NULL },
-  { "Oslash",                            778, NULL },
-  { "dagger",                            556, NULL },
-  { "j",                                 222, NULL },
-  { "k",                                 500, NULL },
-  { "l",                                 222, NULL },
-  { "m",                                 833, NULL },
-  { "n",                                 556, NULL },
-  { "tcommaaccent",                      278, NULL },
-  { "o",                                 556, NULL },
-  { "ordfeminine",                       370, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 556, NULL },
-  { "q",                                 556, NULL },
-  { "uhungarumlaut",                     556, NULL },
-  { "r",                                 333, NULL },
-  { "twosuperior",                       333, NULL },
-  { "aacute",                            556, NULL },
-  { "s",                                 500, NULL },
-  { "OE",                               1000, NULL },
-  { "t",                                 278, NULL },
-  { "divide",                            584, NULL },
-  { "u",                                 556, NULL },
-  { "Ccaron",                            722, NULL },
-  { "v",                                 500, NULL },
-  { "w",                                 722, NULL },
-  { "x",                                 500, NULL },
-  { "y",                                 500, NULL },
-  { "z",                                 500, NULL },
-  { "Gbreve",                            778, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        278, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          355, NULL },
-  { "gcommaaccent",                      556, NULL },
-  { "mu",                                556, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            667, NULL },
-  { "Lslash",                            556, NULL },
-  { "semicolon",                         278, NULL },
-  { "oslash",                            611, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           471, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            500, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            556, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         556, NULL },
-  { "nacute",                            556, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            778, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            500, NULL },
-  { "AE",                               1000, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            222, NULL },
-  { "quotedblleft",                      333, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       191, NULL },
-  { "eight",                             556, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            556, NULL },
-  { "oe",                                944, NULL },
-  { "Abreve",                            667, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       556, NULL },
-  { "Adieresis",                         667, NULL },
-  { "copyright",                         737, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            556, NULL },
-  { "Idieresis",                         278, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               556, NULL },
-  { "emacron",                           556, NULL },
-  { "Odieresis",                         778, NULL },
-  { "ucircumflex",                       556, NULL },
-  { "bracketleft",                       278, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        222, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         667, NULL },
-  { "umacron",                           556, NULL },
-  { "abreve",                            556, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         556, NULL },
-  { "egrave",                            556, NULL },
-  { "edieresis",                         556, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                889, NULL },
-  { "asterisk",                          389, NULL },
-  { "odieresis",                         556, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            556, NULL },
-  { "nine",                              556, NULL },
-  { "five",                              556, NULL },
-  { "udieresis",                         556, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      667, NULL },
-  { "threequarters",                     834, NULL },
-  { "guillemotright",                    556, NULL },
-  { "Ccedilla",                          722, NULL },
-  { "ydieresis",                         500, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                               1015, NULL },
-  { "eacute",                            556, NULL },
-  { "underscore",                        556, NULL },
-  { "Euro",                              556, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          584, NULL },
-  { "zero",                              556, NULL },
-  { "eth",                               556, NULL },
-  { "Scedilla",                          667, NULL },
-  { "Ograve",                            778, NULL },
-  { "Racute",                            722, NULL },
-  { "partialdiff",                       476, NULL },
-  { "uacute",                            556, NULL },
-  { "braceleft",                         334, NULL },
-  { "Thorn",                             667, NULL },
-  { "zcaron",                            500, NULL },
-  { "scommaaccent",                      500, NULL },
-  { "ccedilla",                          500, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            556, NULL },
-  { "Ocircumflex",                       778, NULL },
-  { "Oacute",                            778, NULL },
-  { "scedilla",                          500, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            556, NULL },
-  { "racute",                            333, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             556, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        737, NULL },
-  { "radical",                           453, NULL },
-  { "Aring",                             667, NULL },
-  { "percent",                           889, NULL },
-  { "six",                               556, NULL },
-  { "paragraph",                         537, NULL },
-  { "dcaron",                            643, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               556, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            278, NULL },
-  { "Lacute",                            556, NULL },
-  { "ocircumflex",                       556, NULL },
-  { "oacute",                            556, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      556, NULL },
-  { "tcaron",                            317, NULL },
-  { "eogonek",                           556, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     778, NULL },
-  { "asciicircum",                       469, NULL },
-  { "aring",                             556, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           556, NULL },
-  { "bracketright",                      278, NULL },
-  { "Iacute",                            278, NULL },
-  { "ampersand",                         667, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            222, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              584, NULL },
-  { "uring",                             556, NULL },
-  { "quotesinglbase",                    222, NULL },
-  { "lcommaaccent",                      222, NULL },
-  { "Yacute",                            667, NULL },
-  { "ohungarumlaut",                     556, NULL },
-  { "threesuperior",                     333, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           556, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      333, NULL },
-  { "ncaron",                            556, NULL },
-  { "florin",                            556, NULL },
-  { "yacute",                            500, NULL },
-  { "Rcommaaccent",                      722, NULL },
-  { "fi",                                500, NULL },
-  { "fl",                                500, NULL },
-  { "Acircumflex",                       667, NULL },
-  { "Cacute",                            722, NULL },
-  { "Icircumflex",                       278, NULL },
-  { "guillemotleft",                     556, NULL },
-  { "germandbls",                        611, NULL },
-  { "Amacron",                           667, NULL },
-  { "seven",                             556, NULL },
-  { "Sacute",                            667, NULL },
-  { "ordmasculine",                      365, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          556, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           278, NULL },
-  { "rcommaaccent",                      333, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       556, NULL },
-  { "cacute",                            500, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        334, NULL },
-  { "quotedblright",                     333, NULL },
-  { "amacron",                           556, NULL },
-  { "sacute",                            500, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              556, NULL },
-  { "currency",                          556, NULL },
-  { "logicalnot",                        584, NULL },
-  { "zdotaccent",                        500, NULL },
-  { "Atilde",                            667, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               260, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              584, NULL },
-  { "ecaron",                            556, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            278, NULL },
-  { "period",                            278, NULL },
-  { "Rcaron",                            722, NULL },
-  { "Kcommaaccent",                      667, NULL },
-  { "greater",                           584, NULL },
-  { "atilde",                            556, NULL },
-  { "brokenbar",                         260, NULL },
-  { "quoteleft",                         222, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       333, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            333, nullptr },
+  { "kcommaaccent",                      500, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             278, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         584, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        556, nullptr },
+  { "asciitilde",                        584, nullptr },
+  { "colon",                             278, nullptr },
+  { "onehalf",                           834, nullptr },
+  { "dollar",                            556, nullptr },
+  { "Lcaron",                            556, nullptr },
+  { "ntilde",                            556, nullptr },
+  { "Aogonek",                           667, nullptr },
+  { "ncommaaccent",                      556, nullptr },
+  { "minus",                             584, nullptr },
+  { "Iogonek",                           278, nullptr },
+  { "zacute",                            500, nullptr },
+  { "yen",                               556, nullptr },
+  { "space",                             278, nullptr },
+  { "Omacron",                           778, nullptr },
+  { "questiondown",                      611, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            667, nullptr },
+  { "three",                             556, nullptr },
+  { "numbersign",                        556, nullptr },
+  { "lcaron",                            299, nullptr },
+  { "A",                                 667, nullptr },
+  { "B",                                 667, nullptr },
+  { "C",                                 722, nullptr },
+  { "aogonek",                           556, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        834, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 778, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 278, nullptr },
+  { "J",                                 500, nullptr },
+  { "K",                                 667, nullptr },
+  { "iogonek",                           222, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 556, nullptr },
+  { "periodcentered",                    278, nullptr },
+  { "M",                                 833, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           556, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 778, nullptr },
+  { "P",                                 667, nullptr },
+  { "Q",                                 778, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 722, nullptr },
+  { "Aacute",                            667, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 667, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            556, nullptr },
+  { "V",                                 667, nullptr },
+  { "W",                                 944, nullptr },
+  { "X",                                 667, nullptr },
+  { "question",                          556, nullptr },
+  { "equal",                             584, nullptr },
+  { "Y",                                 667, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              556, nullptr },
+  { "a",                                 556, nullptr },
+  { "Gcommaaccent",                      778, nullptr },
+  { "b",                                 556, nullptr },
+  { "c",                                 500, nullptr },
+  { "d",                                 556, nullptr },
+  { "e",                                 556, nullptr },
+  { "f",                                 278, nullptr },
+  { "g",                                 556, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 556, nullptr },
+  { "i",                                 222, nullptr },
+  { "Oslash",                            778, nullptr },
+  { "dagger",                            556, nullptr },
+  { "j",                                 222, nullptr },
+  { "k",                                 500, nullptr },
+  { "l",                                 222, nullptr },
+  { "m",                                 833, nullptr },
+  { "n",                                 556, nullptr },
+  { "tcommaaccent",                      278, nullptr },
+  { "o",                                 556, nullptr },
+  { "ordfeminine",                       370, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 556, nullptr },
+  { "q",                                 556, nullptr },
+  { "uhungarumlaut",                     556, nullptr },
+  { "r",                                 333, nullptr },
+  { "twosuperior",                       333, nullptr },
+  { "aacute",                            556, nullptr },
+  { "s",                                 500, nullptr },
+  { "OE",                               1000, nullptr },
+  { "t",                                 278, nullptr },
+  { "divide",                            584, nullptr },
+  { "u",                                 556, nullptr },
+  { "Ccaron",                            722, nullptr },
+  { "v",                                 500, nullptr },
+  { "w",                                 722, nullptr },
+  { "x",                                 500, nullptr },
+  { "y",                                 500, nullptr },
+  { "z",                                 500, nullptr },
+  { "Gbreve",                            778, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        278, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          355, nullptr },
+  { "gcommaaccent",                      556, nullptr },
+  { "mu",                                556, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            667, nullptr },
+  { "Lslash",                            556, nullptr },
+  { "semicolon",                         278, nullptr },
+  { "oslash",                            611, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           471, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            500, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            556, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         556, nullptr },
+  { "nacute",                            556, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            778, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            500, nullptr },
+  { "AE",                               1000, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            222, nullptr },
+  { "quotedblleft",                      333, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       191, nullptr },
+  { "eight",                             556, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            556, nullptr },
+  { "oe",                                944, nullptr },
+  { "Abreve",                            667, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       556, nullptr },
+  { "Adieresis",                         667, nullptr },
+  { "copyright",                         737, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            556, nullptr },
+  { "Idieresis",                         278, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               556, nullptr },
+  { "emacron",                           556, nullptr },
+  { "Odieresis",                         778, nullptr },
+  { "ucircumflex",                       556, nullptr },
+  { "bracketleft",                       278, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        222, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         667, nullptr },
+  { "umacron",                           556, nullptr },
+  { "abreve",                            556, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         556, nullptr },
+  { "egrave",                            556, nullptr },
+  { "edieresis",                         556, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                889, nullptr },
+  { "asterisk",                          389, nullptr },
+  { "odieresis",                         556, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            556, nullptr },
+  { "nine",                              556, nullptr },
+  { "five",                              556, nullptr },
+  { "udieresis",                         556, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      667, nullptr },
+  { "threequarters",                     834, nullptr },
+  { "guillemotright",                    556, nullptr },
+  { "Ccedilla",                          722, nullptr },
+  { "ydieresis",                         500, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                               1015, nullptr },
+  { "eacute",                            556, nullptr },
+  { "underscore",                        556, nullptr },
+  { "Euro",                              556, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          584, nullptr },
+  { "zero",                              556, nullptr },
+  { "eth",                               556, nullptr },
+  { "Scedilla",                          667, nullptr },
+  { "Ograve",                            778, nullptr },
+  { "Racute",                            722, nullptr },
+  { "partialdiff",                       476, nullptr },
+  { "uacute",                            556, nullptr },
+  { "braceleft",                         334, nullptr },
+  { "Thorn",                             667, nullptr },
+  { "zcaron",                            500, nullptr },
+  { "scommaaccent",                      500, nullptr },
+  { "ccedilla",                          500, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            556, nullptr },
+  { "Ocircumflex",                       778, nullptr },
+  { "Oacute",                            778, nullptr },
+  { "scedilla",                          500, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            556, nullptr },
+  { "racute",                            333, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             556, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        737, nullptr },
+  { "radical",                           453, nullptr },
+  { "Aring",                             667, nullptr },
+  { "percent",                           889, nullptr },
+  { "six",                               556, nullptr },
+  { "paragraph",                         537, nullptr },
+  { "dcaron",                            643, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               556, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            278, nullptr },
+  { "Lacute",                            556, nullptr },
+  { "ocircumflex",                       556, nullptr },
+  { "oacute",                            556, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      556, nullptr },
+  { "tcaron",                            317, nullptr },
+  { "eogonek",                           556, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     778, nullptr },
+  { "asciicircum",                       469, nullptr },
+  { "aring",                             556, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           556, nullptr },
+  { "bracketright",                      278, nullptr },
+  { "Iacute",                            278, nullptr },
+  { "ampersand",                         667, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            222, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              584, nullptr },
+  { "uring",                             556, nullptr },
+  { "quotesinglbase",                    222, nullptr },
+  { "lcommaaccent",                      222, nullptr },
+  { "Yacute",                            667, nullptr },
+  { "ohungarumlaut",                     556, nullptr },
+  { "threesuperior",                     333, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           556, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      333, nullptr },
+  { "ncaron",                            556, nullptr },
+  { "florin",                            556, nullptr },
+  { "yacute",                            500, nullptr },
+  { "Rcommaaccent",                      722, nullptr },
+  { "fi",                                500, nullptr },
+  { "fl",                                500, nullptr },
+  { "Acircumflex",                       667, nullptr },
+  { "Cacute",                            722, nullptr },
+  { "Icircumflex",                       278, nullptr },
+  { "guillemotleft",                     556, nullptr },
+  { "germandbls",                        611, nullptr },
+  { "Amacron",                           667, nullptr },
+  { "seven",                             556, nullptr },
+  { "Sacute",                            667, nullptr },
+  { "ordmasculine",                      365, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          556, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           278, nullptr },
+  { "rcommaaccent",                      333, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       556, nullptr },
+  { "cacute",                            500, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        334, nullptr },
+  { "quotedblright",                     333, nullptr },
+  { "amacron",                           556, nullptr },
+  { "sacute",                            500, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              556, nullptr },
+  { "currency",                          556, nullptr },
+  { "logicalnot",                        584, nullptr },
+  { "zdotaccent",                        500, nullptr },
+  { "Atilde",                            667, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               260, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              584, nullptr },
+  { "ecaron",                            556, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            278, nullptr },
+  { "period",                            278, nullptr },
+  { "Rcaron",                            722, nullptr },
+  { "Kcommaaccent",                      667, nullptr },
+  { "greater",                           584, nullptr },
+  { "atilde",                            556, nullptr },
+  { "brokenbar",                         260, nullptr },
+  { "quoteleft",                         222, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       333, nullptr }
 };
 
 static BuiltinFontWidth helveticaBoldWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            389, NULL },
-  { "kcommaaccent",                      556, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             278, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         584, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        556, NULL },
-  { "asciitilde",                        584, NULL },
-  { "colon",                             333, NULL },
-  { "onehalf",                           834, NULL },
-  { "dollar",                            556, NULL },
-  { "Lcaron",                            611, NULL },
-  { "ntilde",                            611, NULL },
-  { "Aogonek",                           722, NULL },
-  { "ncommaaccent",                      611, NULL },
-  { "minus",                             584, NULL },
-  { "Iogonek",                           278, NULL },
-  { "zacute",                            500, NULL },
-  { "yen",                               556, NULL },
-  { "space",                             278, NULL },
-  { "Omacron",                           778, NULL },
-  { "questiondown",                      611, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            722, NULL },
-  { "three",                             556, NULL },
-  { "numbersign",                        556, NULL },
-  { "lcaron",                            400, NULL },
-  { "A",                                 722, NULL },
-  { "B",                                 722, NULL },
-  { "C",                                 722, NULL },
-  { "aogonek",                           556, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        834, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 778, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 278, NULL },
-  { "J",                                 556, NULL },
-  { "K",                                 722, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 611, NULL },
-  { "periodcentered",                    278, NULL },
-  { "M",                                 833, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           611, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 778, NULL },
-  { "P",                                 667, NULL },
-  { "Q",                                 778, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 722, NULL },
-  { "Aacute",                            722, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 667, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            556, NULL },
-  { "V",                                 667, NULL },
-  { "W",                                 944, NULL },
-  { "X",                                 667, NULL },
-  { "question",                          611, NULL },
-  { "equal",                             584, NULL },
-  { "Y",                                 667, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              556, NULL },
-  { "a",                                 556, NULL },
-  { "Gcommaaccent",                      778, NULL },
-  { "b",                                 611, NULL },
-  { "c",                                 556, NULL },
-  { "d",                                 611, NULL },
-  { "e",                                 556, NULL },
-  { "f",                                 333, NULL },
-  { "g",                                 611, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 611, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            778, NULL },
-  { "dagger",                            556, NULL },
-  { "j",                                 278, NULL },
-  { "k",                                 556, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 889, NULL },
-  { "n",                                 611, NULL },
-  { "tcommaaccent",                      333, NULL },
-  { "o",                                 611, NULL },
-  { "ordfeminine",                       370, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 611, NULL },
-  { "q",                                 611, NULL },
-  { "uhungarumlaut",                     611, NULL },
-  { "r",                                 389, NULL },
-  { "twosuperior",                       333, NULL },
-  { "aacute",                            556, NULL },
-  { "s",                                 556, NULL },
-  { "OE",                               1000, NULL },
-  { "t",                                 333, NULL },
-  { "divide",                            584, NULL },
-  { "u",                                 611, NULL },
-  { "Ccaron",                            722, NULL },
-  { "v",                                 556, NULL },
-  { "w",                                 778, NULL },
-  { "x",                                 556, NULL },
-  { "y",                                 556, NULL },
-  { "z",                                 500, NULL },
-  { "Gbreve",                            778, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        278, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          474, NULL },
-  { "gcommaaccent",                      611, NULL },
-  { "mu",                                611, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            667, NULL },
-  { "Lslash",                            611, NULL },
-  { "semicolon",                         333, NULL },
-  { "oslash",                            611, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           494, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            556, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            611, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         556, NULL },
-  { "nacute",                            611, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            778, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            556, NULL },
-  { "AE",                               1000, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      500, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       238, NULL },
-  { "eight",                             556, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            556, NULL },
-  { "oe",                                944, NULL },
-  { "Abreve",                            722, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       556, NULL },
-  { "Adieresis",                         722, NULL },
-  { "copyright",                         737, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            611, NULL },
-  { "Idieresis",                         278, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               556, NULL },
-  { "emacron",                           556, NULL },
-  { "Odieresis",                         778, NULL },
-  { "ucircumflex",                       611, NULL },
-  { "bracketleft",                       333, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        278, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         667, NULL },
-  { "umacron",                           611, NULL },
-  { "abreve",                            556, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         556, NULL },
-  { "egrave",                            556, NULL },
-  { "edieresis",                         556, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                889, NULL },
-  { "asterisk",                          389, NULL },
-  { "odieresis",                         611, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            611, NULL },
-  { "nine",                              556, NULL },
-  { "five",                              556, NULL },
-  { "udieresis",                         611, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      667, NULL },
-  { "threequarters",                     834, NULL },
-  { "guillemotright",                    556, NULL },
-  { "Ccedilla",                          722, NULL },
-  { "ydieresis",                         556, NULL },
-  { "tilde",                             333, NULL },
-  { "dbldaggerumlaut",                   556, NULL },
-  { "at",                                975, NULL },
-  { "eacute",                            556, NULL },
-  { "underscore",                        556, NULL },
-  { "Euro",                              556, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          584, NULL },
-  { "zero",                              556, NULL },
-  { "eth",                               611, NULL },
-  { "Scedilla",                          667, NULL },
-  { "Ograve",                            778, NULL },
-  { "Racute",                            722, NULL },
-  { "partialdiff",                       494, NULL },
-  { "uacute",                            611, NULL },
-  { "braceleft",                         389, NULL },
-  { "Thorn",                             667, NULL },
-  { "zcaron",                            500, NULL },
-  { "scommaaccent",                      556, NULL },
-  { "ccedilla",                          556, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            611, NULL },
-  { "Ocircumflex",                       778, NULL },
-  { "Oacute",                            778, NULL },
-  { "scedilla",                          556, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            611, NULL },
-  { "racute",                            389, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             611, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        737, NULL },
-  { "radical",                           549, NULL },
-  { "Aring",                             722, NULL },
-  { "percent",                           889, NULL },
-  { "six",                               556, NULL },
-  { "paragraph",                         556, NULL },
-  { "dcaron",                            743, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               556, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            278, NULL },
-  { "Lacute",                            611, NULL },
-  { "ocircumflex",                       611, NULL },
-  { "oacute",                            611, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      611, NULL },
-  { "tcaron",                            389, NULL },
-  { "eogonek",                           556, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     778, NULL },
-  { "asciicircum",                       584, NULL },
-  { "aring",                             556, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           611, NULL },
-  { "bracketright",                      333, NULL },
-  { "Iacute",                            278, NULL },
-  { "ampersand",                         722, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              584, NULL },
-  { "uring",                             611, NULL },
-  { "quotesinglbase",                    278, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            667, NULL },
-  { "ohungarumlaut",                     611, NULL },
-  { "threesuperior",                     333, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           556, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      500, NULL },
-  { "ncaron",                            611, NULL },
-  { "florin",                            556, NULL },
-  { "yacute",                            556, NULL },
-  { "Rcommaaccent",                      722, NULL },
-  { "fi",                                611, NULL },
-  { "fl",                                611, NULL },
-  { "Acircumflex",                       722, NULL },
-  { "Cacute",                            722, NULL },
-  { "Icircumflex",                       278, NULL },
-  { "guillemotleft",                     556, NULL },
-  { "germandbls",                        611, NULL },
-  { "Amacron",                           722, NULL },
-  { "seven",                             556, NULL },
-  { "Sacute",                            667, NULL },
-  { "ordmasculine",                      365, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          556, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           278, NULL },
-  { "rcommaaccent",                      389, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       556, NULL },
-  { "cacute",                            556, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        389, NULL },
-  { "quotedblright",                     500, NULL },
-  { "amacron",                           556, NULL },
-  { "sacute",                            556, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              556, NULL },
-  { "currency",                          556, NULL },
-  { "logicalnot",                        584, NULL },
-  { "zdotaccent",                        500, NULL },
-  { "Atilde",                            722, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               280, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              584, NULL },
-  { "ecaron",                            556, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            333, NULL },
-  { "period",                            278, NULL },
-  { "Rcaron",                            722, NULL },
-  { "Kcommaaccent",                      722, NULL },
-  { "greater",                           584, NULL },
-  { "atilde",                            556, NULL },
-  { "brokenbar",                         280, NULL },
-  { "quoteleft",                         278, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       333, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            389, nullptr },
+  { "kcommaaccent",                      556, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             278, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         584, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        556, nullptr },
+  { "asciitilde",                        584, nullptr },
+  { "colon",                             333, nullptr },
+  { "onehalf",                           834, nullptr },
+  { "dollar",                            556, nullptr },
+  { "Lcaron",                            611, nullptr },
+  { "ntilde",                            611, nullptr },
+  { "Aogonek",                           722, nullptr },
+  { "ncommaaccent",                      611, nullptr },
+  { "minus",                             584, nullptr },
+  { "Iogonek",                           278, nullptr },
+  { "zacute",                            500, nullptr },
+  { "yen",                               556, nullptr },
+  { "space",                             278, nullptr },
+  { "Omacron",                           778, nullptr },
+  { "questiondown",                      611, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            722, nullptr },
+  { "three",                             556, nullptr },
+  { "numbersign",                        556, nullptr },
+  { "lcaron",                            400, nullptr },
+  { "A",                                 722, nullptr },
+  { "B",                                 722, nullptr },
+  { "C",                                 722, nullptr },
+  { "aogonek",                           556, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        834, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 778, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 278, nullptr },
+  { "J",                                 556, nullptr },
+  { "K",                                 722, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 611, nullptr },
+  { "periodcentered",                    278, nullptr },
+  { "M",                                 833, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           611, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 778, nullptr },
+  { "P",                                 667, nullptr },
+  { "Q",                                 778, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 722, nullptr },
+  { "Aacute",                            722, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 667, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            556, nullptr },
+  { "V",                                 667, nullptr },
+  { "W",                                 944, nullptr },
+  { "X",                                 667, nullptr },
+  { "question",                          611, nullptr },
+  { "equal",                             584, nullptr },
+  { "Y",                                 667, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              556, nullptr },
+  { "a",                                 556, nullptr },
+  { "Gcommaaccent",                      778, nullptr },
+  { "b",                                 611, nullptr },
+  { "c",                                 556, nullptr },
+  { "d",                                 611, nullptr },
+  { "e",                                 556, nullptr },
+  { "f",                                 333, nullptr },
+  { "g",                                 611, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 611, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            778, nullptr },
+  { "dagger",                            556, nullptr },
+  { "j",                                 278, nullptr },
+  { "k",                                 556, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 889, nullptr },
+  { "n",                                 611, nullptr },
+  { "tcommaaccent",                      333, nullptr },
+  { "o",                                 611, nullptr },
+  { "ordfeminine",                       370, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 611, nullptr },
+  { "q",                                 611, nullptr },
+  { "uhungarumlaut",                     611, nullptr },
+  { "r",                                 389, nullptr },
+  { "twosuperior",                       333, nullptr },
+  { "aacute",                            556, nullptr },
+  { "s",                                 556, nullptr },
+  { "OE",                               1000, nullptr },
+  { "t",                                 333, nullptr },
+  { "divide",                            584, nullptr },
+  { "u",                                 611, nullptr },
+  { "Ccaron",                            722, nullptr },
+  { "v",                                 556, nullptr },
+  { "w",                                 778, nullptr },
+  { "x",                                 556, nullptr },
+  { "y",                                 556, nullptr },
+  { "z",                                 500, nullptr },
+  { "Gbreve",                            778, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        278, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          474, nullptr },
+  { "gcommaaccent",                      611, nullptr },
+  { "mu",                                611, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            667, nullptr },
+  { "Lslash",                            611, nullptr },
+  { "semicolon",                         333, nullptr },
+  { "oslash",                            611, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           494, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            556, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            611, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         556, nullptr },
+  { "nacute",                            611, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            778, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            556, nullptr },
+  { "AE",                               1000, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      500, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       238, nullptr },
+  { "eight",                             556, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            556, nullptr },
+  { "oe",                                944, nullptr },
+  { "Abreve",                            722, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       556, nullptr },
+  { "Adieresis",                         722, nullptr },
+  { "copyright",                         737, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            611, nullptr },
+  { "Idieresis",                         278, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               556, nullptr },
+  { "emacron",                           556, nullptr },
+  { "Odieresis",                         778, nullptr },
+  { "ucircumflex",                       611, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        278, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         667, nullptr },
+  { "umacron",                           611, nullptr },
+  { "abreve",                            556, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         556, nullptr },
+  { "egrave",                            556, nullptr },
+  { "edieresis",                         556, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                889, nullptr },
+  { "asterisk",                          389, nullptr },
+  { "odieresis",                         611, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            611, nullptr },
+  { "nine",                              556, nullptr },
+  { "five",                              556, nullptr },
+  { "udieresis",                         611, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      667, nullptr },
+  { "threequarters",                     834, nullptr },
+  { "guillemotright",                    556, nullptr },
+  { "Ccedilla",                          722, nullptr },
+  { "ydieresis",                         556, nullptr },
+  { "tilde",                             333, nullptr },
+  { "dbldaggerumlaut",                   556, nullptr },
+  { "at",                                975, nullptr },
+  { "eacute",                            556, nullptr },
+  { "underscore",                        556, nullptr },
+  { "Euro",                              556, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          584, nullptr },
+  { "zero",                              556, nullptr },
+  { "eth",                               611, nullptr },
+  { "Scedilla",                          667, nullptr },
+  { "Ograve",                            778, nullptr },
+  { "Racute",                            722, nullptr },
+  { "partialdiff",                       494, nullptr },
+  { "uacute",                            611, nullptr },
+  { "braceleft",                         389, nullptr },
+  { "Thorn",                             667, nullptr },
+  { "zcaron",                            500, nullptr },
+  { "scommaaccent",                      556, nullptr },
+  { "ccedilla",                          556, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            611, nullptr },
+  { "Ocircumflex",                       778, nullptr },
+  { "Oacute",                            778, nullptr },
+  { "scedilla",                          556, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            611, nullptr },
+  { "racute",                            389, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             611, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        737, nullptr },
+  { "radical",                           549, nullptr },
+  { "Aring",                             722, nullptr },
+  { "percent",                           889, nullptr },
+  { "six",                               556, nullptr },
+  { "paragraph",                         556, nullptr },
+  { "dcaron",                            743, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               556, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            278, nullptr },
+  { "Lacute",                            611, nullptr },
+  { "ocircumflex",                       611, nullptr },
+  { "oacute",                            611, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      611, nullptr },
+  { "tcaron",                            389, nullptr },
+  { "eogonek",                           556, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     778, nullptr },
+  { "asciicircum",                       584, nullptr },
+  { "aring",                             556, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           611, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "Iacute",                            278, nullptr },
+  { "ampersand",                         722, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              584, nullptr },
+  { "uring",                             611, nullptr },
+  { "quotesinglbase",                    278, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            667, nullptr },
+  { "ohungarumlaut",                     611, nullptr },
+  { "threesuperior",                     333, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           556, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      500, nullptr },
+  { "ncaron",                            611, nullptr },
+  { "florin",                            556, nullptr },
+  { "yacute",                            556, nullptr },
+  { "Rcommaaccent",                      722, nullptr },
+  { "fi",                                611, nullptr },
+  { "fl",                                611, nullptr },
+  { "Acircumflex",                       722, nullptr },
+  { "Cacute",                            722, nullptr },
+  { "Icircumflex",                       278, nullptr },
+  { "guillemotleft",                     556, nullptr },
+  { "germandbls",                        611, nullptr },
+  { "Amacron",                           722, nullptr },
+  { "seven",                             556, nullptr },
+  { "Sacute",                            667, nullptr },
+  { "ordmasculine",                      365, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          556, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           278, nullptr },
+  { "rcommaaccent",                      389, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       556, nullptr },
+  { "cacute",                            556, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        389, nullptr },
+  { "quotedblright",                     500, nullptr },
+  { "amacron",                           556, nullptr },
+  { "sacute",                            556, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              556, nullptr },
+  { "currency",                          556, nullptr },
+  { "logicalnot",                        584, nullptr },
+  { "zdotaccent",                        500, nullptr },
+  { "Atilde",                            722, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               280, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              584, nullptr },
+  { "ecaron",                            556, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            333, nullptr },
+  { "period",                            278, nullptr },
+  { "Rcaron",                            722, nullptr },
+  { "Kcommaaccent",                      722, nullptr },
+  { "greater",                           584, nullptr },
+  { "atilde",                            556, nullptr },
+  { "brokenbar",                         280, nullptr },
+  { "quoteleft",                         278, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       333, nullptr }
 };
 
 static BuiltinFontWidth helveticaBoldObliqueWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            389, NULL },
-  { "kcommaaccent",                      556, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             278, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         584, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        556, NULL },
-  { "asciitilde",                        584, NULL },
-  { "colon",                             333, NULL },
-  { "onehalf",                           834, NULL },
-  { "dollar",                            556, NULL },
-  { "Lcaron",                            611, NULL },
-  { "ntilde",                            611, NULL },
-  { "Aogonek",                           722, NULL },
-  { "ncommaaccent",                      611, NULL },
-  { "minus",                             584, NULL },
-  { "Iogonek",                           278, NULL },
-  { "zacute",                            500, NULL },
-  { "yen",                               556, NULL },
-  { "space",                             278, NULL },
-  { "Omacron",                           778, NULL },
-  { "questiondown",                      611, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            722, NULL },
-  { "three",                             556, NULL },
-  { "numbersign",                        556, NULL },
-  { "lcaron",                            400, NULL },
-  { "A",                                 722, NULL },
-  { "B",                                 722, NULL },
-  { "C",                                 722, NULL },
-  { "aogonek",                           556, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        834, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 778, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 278, NULL },
-  { "J",                                 556, NULL },
-  { "K",                                 722, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 611, NULL },
-  { "periodcentered",                    278, NULL },
-  { "M",                                 833, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           611, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 778, NULL },
-  { "P",                                 667, NULL },
-  { "Q",                                 778, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 722, NULL },
-  { "Aacute",                            722, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 667, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            556, NULL },
-  { "V",                                 667, NULL },
-  { "W",                                 944, NULL },
-  { "X",                                 667, NULL },
-  { "question",                          611, NULL },
-  { "equal",                             584, NULL },
-  { "Y",                                 667, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              556, NULL },
-  { "a",                                 556, NULL },
-  { "Gcommaaccent",                      778, NULL },
-  { "b",                                 611, NULL },
-  { "c",                                 556, NULL },
-  { "d",                                 611, NULL },
-  { "e",                                 556, NULL },
-  { "f",                                 333, NULL },
-  { "g",                                 611, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 611, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            778, NULL },
-  { "dagger",                            556, NULL },
-  { "j",                                 278, NULL },
-  { "k",                                 556, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 889, NULL },
-  { "n",                                 611, NULL },
-  { "tcommaaccent",                      333, NULL },
-  { "o",                                 611, NULL },
-  { "ordfeminine",                       370, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 611, NULL },
-  { "q",                                 611, NULL },
-  { "uhungarumlaut",                     611, NULL },
-  { "r",                                 389, NULL },
-  { "twosuperior",                       333, NULL },
-  { "aacute",                            556, NULL },
-  { "s",                                 556, NULL },
-  { "OE",                               1000, NULL },
-  { "t",                                 333, NULL },
-  { "divide",                            584, NULL },
-  { "u",                                 611, NULL },
-  { "Ccaron",                            722, NULL },
-  { "v",                                 556, NULL },
-  { "w",                                 778, NULL },
-  { "x",                                 556, NULL },
-  { "y",                                 556, NULL },
-  { "z",                                 500, NULL },
-  { "Gbreve",                            778, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        278, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          474, NULL },
-  { "gcommaaccent",                      611, NULL },
-  { "mu",                                611, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            667, NULL },
-  { "Lslash",                            611, NULL },
-  { "semicolon",                         333, NULL },
-  { "oslash",                            611, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           494, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            556, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            611, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         556, NULL },
-  { "nacute",                            611, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            778, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            556, NULL },
-  { "AE",                               1000, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      500, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       238, NULL },
-  { "eight",                             556, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            556, NULL },
-  { "oe",                                944, NULL },
-  { "Abreve",                            722, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       556, NULL },
-  { "Adieresis",                         722, NULL },
-  { "copyright",                         737, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            611, NULL },
-  { "Idieresis",                         278, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               556, NULL },
-  { "emacron",                           556, NULL },
-  { "Odieresis",                         778, NULL },
-  { "ucircumflex",                       611, NULL },
-  { "bracketleft",                       333, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        278, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         667, NULL },
-  { "umacron",                           611, NULL },
-  { "abreve",                            556, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         556, NULL },
-  { "egrave",                            556, NULL },
-  { "edieresis",                         556, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                889, NULL },
-  { "asterisk",                          389, NULL },
-  { "odieresis",                         611, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            611, NULL },
-  { "nine",                              556, NULL },
-  { "five",                              556, NULL },
-  { "udieresis",                         611, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      667, NULL },
-  { "threequarters",                     834, NULL },
-  { "guillemotright",                    556, NULL },
-  { "Ccedilla",                          722, NULL },
-  { "ydieresis",                         556, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                                975, NULL },
-  { "eacute",                            556, NULL },
-  { "underscore",                        556, NULL },
-  { "Euro",                              556, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          584, NULL },
-  { "zero",                              556, NULL },
-  { "eth",                               611, NULL },
-  { "Scedilla",                          667, NULL },
-  { "Ograve",                            778, NULL },
-  { "Racute",                            722, NULL },
-  { "partialdiff",                       494, NULL },
-  { "uacute",                            611, NULL },
-  { "braceleft",                         389, NULL },
-  { "Thorn",                             667, NULL },
-  { "zcaron",                            500, NULL },
-  { "scommaaccent",                      556, NULL },
-  { "ccedilla",                          556, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            611, NULL },
-  { "Ocircumflex",                       778, NULL },
-  { "Oacute",                            778, NULL },
-  { "scedilla",                          556, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            611, NULL },
-  { "racute",                            389, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             611, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        737, NULL },
-  { "radical",                           549, NULL },
-  { "Aring",                             722, NULL },
-  { "percent",                           889, NULL },
-  { "six",                               556, NULL },
-  { "paragraph",                         556, NULL },
-  { "dcaron",                            743, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               556, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            278, NULL },
-  { "Lacute",                            611, NULL },
-  { "ocircumflex",                       611, NULL },
-  { "oacute",                            611, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      611, NULL },
-  { "tcaron",                            389, NULL },
-  { "eogonek",                           556, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     778, NULL },
-  { "asciicircum",                       584, NULL },
-  { "aring",                             556, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           611, NULL },
-  { "bracketright",                      333, NULL },
-  { "Iacute",                            278, NULL },
-  { "ampersand",                         722, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              584, NULL },
-  { "uring",                             611, NULL },
-  { "quotesinglbase",                    278, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            667, NULL },
-  { "ohungarumlaut",                     611, NULL },
-  { "threesuperior",                     333, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           556, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      500, NULL },
-  { "ncaron",                            611, NULL },
-  { "florin",                            556, NULL },
-  { "yacute",                            556, NULL },
-  { "Rcommaaccent",                      722, NULL },
-  { "fi",                                611, NULL },
-  { "fl",                                611, NULL },
-  { "Acircumflex",                       722, NULL },
-  { "Cacute",                            722, NULL },
-  { "Icircumflex",                       278, NULL },
-  { "guillemotleft",                     556, NULL },
-  { "germandbls",                        611, NULL },
-  { "Amacron",                           722, NULL },
-  { "seven",                             556, NULL },
-  { "Sacute",                            667, NULL },
-  { "ordmasculine",                      365, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          556, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           278, NULL },
-  { "rcommaaccent",                      389, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       556, NULL },
-  { "cacute",                            556, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        389, NULL },
-  { "quotedblright",                     500, NULL },
-  { "amacron",                           556, NULL },
-  { "sacute",                            556, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              556, NULL },
-  { "currency",                          556, NULL },
-  { "logicalnot",                        584, NULL },
-  { "zdotaccent",                        500, NULL },
-  { "Atilde",                            722, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               280, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              584, NULL },
-  { "ecaron",                            556, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            333, NULL },
-  { "period",                            278, NULL },
-  { "Rcaron",                            722, NULL },
-  { "Kcommaaccent",                      722, NULL },
-  { "greater",                           584, NULL },
-  { "atilde",                            556, NULL },
-  { "brokenbar",                         280, NULL },
-  { "quoteleft",                         278, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       333, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            389, nullptr },
+  { "kcommaaccent",                      556, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             278, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         584, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        556, nullptr },
+  { "asciitilde",                        584, nullptr },
+  { "colon",                             333, nullptr },
+  { "onehalf",                           834, nullptr },
+  { "dollar",                            556, nullptr },
+  { "Lcaron",                            611, nullptr },
+  { "ntilde",                            611, nullptr },
+  { "Aogonek",                           722, nullptr },
+  { "ncommaaccent",                      611, nullptr },
+  { "minus",                             584, nullptr },
+  { "Iogonek",                           278, nullptr },
+  { "zacute",                            500, nullptr },
+  { "yen",                               556, nullptr },
+  { "space",                             278, nullptr },
+  { "Omacron",                           778, nullptr },
+  { "questiondown",                      611, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            722, nullptr },
+  { "three",                             556, nullptr },
+  { "numbersign",                        556, nullptr },
+  { "lcaron",                            400, nullptr },
+  { "A",                                 722, nullptr },
+  { "B",                                 722, nullptr },
+  { "C",                                 722, nullptr },
+  { "aogonek",                           556, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        834, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 778, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 278, nullptr },
+  { "J",                                 556, nullptr },
+  { "K",                                 722, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 611, nullptr },
+  { "periodcentered",                    278, nullptr },
+  { "M",                                 833, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           611, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 778, nullptr },
+  { "P",                                 667, nullptr },
+  { "Q",                                 778, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 722, nullptr },
+  { "Aacute",                            722, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 667, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            556, nullptr },
+  { "V",                                 667, nullptr },
+  { "W",                                 944, nullptr },
+  { "X",                                 667, nullptr },
+  { "question",                          611, nullptr },
+  { "equal",                             584, nullptr },
+  { "Y",                                 667, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              556, nullptr },
+  { "a",                                 556, nullptr },
+  { "Gcommaaccent",                      778, nullptr },
+  { "b",                                 611, nullptr },
+  { "c",                                 556, nullptr },
+  { "d",                                 611, nullptr },
+  { "e",                                 556, nullptr },
+  { "f",                                 333, nullptr },
+  { "g",                                 611, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 611, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            778, nullptr },
+  { "dagger",                            556, nullptr },
+  { "j",                                 278, nullptr },
+  { "k",                                 556, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 889, nullptr },
+  { "n",                                 611, nullptr },
+  { "tcommaaccent",                      333, nullptr },
+  { "o",                                 611, nullptr },
+  { "ordfeminine",                       370, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 611, nullptr },
+  { "q",                                 611, nullptr },
+  { "uhungarumlaut",                     611, nullptr },
+  { "r",                                 389, nullptr },
+  { "twosuperior",                       333, nullptr },
+  { "aacute",                            556, nullptr },
+  { "s",                                 556, nullptr },
+  { "OE",                               1000, nullptr },
+  { "t",                                 333, nullptr },
+  { "divide",                            584, nullptr },
+  { "u",                                 611, nullptr },
+  { "Ccaron",                            722, nullptr },
+  { "v",                                 556, nullptr },
+  { "w",                                 778, nullptr },
+  { "x",                                 556, nullptr },
+  { "y",                                 556, nullptr },
+  { "z",                                 500, nullptr },
+  { "Gbreve",                            778, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        278, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          474, nullptr },
+  { "gcommaaccent",                      611, nullptr },
+  { "mu",                                611, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            667, nullptr },
+  { "Lslash",                            611, nullptr },
+  { "semicolon",                         333, nullptr },
+  { "oslash",                            611, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           494, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            556, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            611, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         556, nullptr },
+  { "nacute",                            611, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            778, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            556, nullptr },
+  { "AE",                               1000, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      500, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       238, nullptr },
+  { "eight",                             556, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            556, nullptr },
+  { "oe",                                944, nullptr },
+  { "Abreve",                            722, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       556, nullptr },
+  { "Adieresis",                         722, nullptr },
+  { "copyright",                         737, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            611, nullptr },
+  { "Idieresis",                         278, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               556, nullptr },
+  { "emacron",                           556, nullptr },
+  { "Odieresis",                         778, nullptr },
+  { "ucircumflex",                       611, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        278, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         667, nullptr },
+  { "umacron",                           611, nullptr },
+  { "abreve",                            556, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         556, nullptr },
+  { "egrave",                            556, nullptr },
+  { "edieresis",                         556, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                889, nullptr },
+  { "asterisk",                          389, nullptr },
+  { "odieresis",                         611, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            611, nullptr },
+  { "nine",                              556, nullptr },
+  { "five",                              556, nullptr },
+  { "udieresis",                         611, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      667, nullptr },
+  { "threequarters",                     834, nullptr },
+  { "guillemotright",                    556, nullptr },
+  { "Ccedilla",                          722, nullptr },
+  { "ydieresis",                         556, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                                975, nullptr },
+  { "eacute",                            556, nullptr },
+  { "underscore",                        556, nullptr },
+  { "Euro",                              556, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          584, nullptr },
+  { "zero",                              556, nullptr },
+  { "eth",                               611, nullptr },
+  { "Scedilla",                          667, nullptr },
+  { "Ograve",                            778, nullptr },
+  { "Racute",                            722, nullptr },
+  { "partialdiff",                       494, nullptr },
+  { "uacute",                            611, nullptr },
+  { "braceleft",                         389, nullptr },
+  { "Thorn",                             667, nullptr },
+  { "zcaron",                            500, nullptr },
+  { "scommaaccent",                      556, nullptr },
+  { "ccedilla",                          556, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            611, nullptr },
+  { "Ocircumflex",                       778, nullptr },
+  { "Oacute",                            778, nullptr },
+  { "scedilla",                          556, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            611, nullptr },
+  { "racute",                            389, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             611, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        737, nullptr },
+  { "radical",                           549, nullptr },
+  { "Aring",                             722, nullptr },
+  { "percent",                           889, nullptr },
+  { "six",                               556, nullptr },
+  { "paragraph",                         556, nullptr },
+  { "dcaron",                            743, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               556, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            278, nullptr },
+  { "Lacute",                            611, nullptr },
+  { "ocircumflex",                       611, nullptr },
+  { "oacute",                            611, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      611, nullptr },
+  { "tcaron",                            389, nullptr },
+  { "eogonek",                           556, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     778, nullptr },
+  { "asciicircum",                       584, nullptr },
+  { "aring",                             556, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           611, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "Iacute",                            278, nullptr },
+  { "ampersand",                         722, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              584, nullptr },
+  { "uring",                             611, nullptr },
+  { "quotesinglbase",                    278, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            667, nullptr },
+  { "ohungarumlaut",                     611, nullptr },
+  { "threesuperior",                     333, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           556, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      500, nullptr },
+  { "ncaron",                            611, nullptr },
+  { "florin",                            556, nullptr },
+  { "yacute",                            556, nullptr },
+  { "Rcommaaccent",                      722, nullptr },
+  { "fi",                                611, nullptr },
+  { "fl",                                611, nullptr },
+  { "Acircumflex",                       722, nullptr },
+  { "Cacute",                            722, nullptr },
+  { "Icircumflex",                       278, nullptr },
+  { "guillemotleft",                     556, nullptr },
+  { "germandbls",                        611, nullptr },
+  { "Amacron",                           722, nullptr },
+  { "seven",                             556, nullptr },
+  { "Sacute",                            667, nullptr },
+  { "ordmasculine",                      365, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          556, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           278, nullptr },
+  { "rcommaaccent",                      389, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       556, nullptr },
+  { "cacute",                            556, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        389, nullptr },
+  { "quotedblright",                     500, nullptr },
+  { "amacron",                           556, nullptr },
+  { "sacute",                            556, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              556, nullptr },
+  { "currency",                          556, nullptr },
+  { "logicalnot",                        584, nullptr },
+  { "zdotaccent",                        500, nullptr },
+  { "Atilde",                            722, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               280, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              584, nullptr },
+  { "ecaron",                            556, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            333, nullptr },
+  { "period",                            278, nullptr },
+  { "Rcaron",                            722, nullptr },
+  { "Kcommaaccent",                      722, nullptr },
+  { "greater",                           584, nullptr },
+  { "atilde",                            556, nullptr },
+  { "brokenbar",                         280, nullptr },
+  { "quoteleft",                         278, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       333, nullptr }
 };
 
 static BuiltinFontWidth helveticaObliqueWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            333, NULL },
-  { "kcommaaccent",                      500, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             278, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         584, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        556, NULL },
-  { "asciitilde",                        584, NULL },
-  { "colon",                             278, NULL },
-  { "onehalf",                           834, NULL },
-  { "dollar",                            556, NULL },
-  { "Lcaron",                            556, NULL },
-  { "ntilde",                            556, NULL },
-  { "Aogonek",                           667, NULL },
-  { "ncommaaccent",                      556, NULL },
-  { "minus",                             584, NULL },
-  { "Iogonek",                           278, NULL },
-  { "zacute",                            500, NULL },
-  { "yen",                               556, NULL },
-  { "space",                             278, NULL },
-  { "Omacron",                           778, NULL },
-  { "questiondown",                      611, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            667, NULL },
-  { "three",                             556, NULL },
-  { "numbersign",                        556, NULL },
-  { "lcaron",                            299, NULL },
-  { "A",                                 667, NULL },
-  { "B",                                 667, NULL },
-  { "C",                                 722, NULL },
-  { "aogonek",                           556, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        834, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 778, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 278, NULL },
-  { "J",                                 500, NULL },
-  { "K",                                 667, NULL },
-  { "iogonek",                           222, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 556, NULL },
-  { "periodcentered",                    278, NULL },
-  { "M",                                 833, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           556, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 778, NULL },
-  { "P",                                 667, NULL },
-  { "Q",                                 778, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 722, NULL },
-  { "Aacute",                            667, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 667, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            556, NULL },
-  { "V",                                 667, NULL },
-  { "W",                                 944, NULL },
-  { "X",                                 667, NULL },
-  { "question",                          556, NULL },
-  { "equal",                             584, NULL },
-  { "Y",                                 667, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              556, NULL },
-  { "a",                                 556, NULL },
-  { "Gcommaaccent",                      778, NULL },
-  { "b",                                 556, NULL },
-  { "c",                                 500, NULL },
-  { "d",                                 556, NULL },
-  { "e",                                 556, NULL },
-  { "f",                                 278, NULL },
-  { "g",                                 556, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 556, NULL },
-  { "i",                                 222, NULL },
-  { "Oslash",                            778, NULL },
-  { "dagger",                            556, NULL },
-  { "j",                                 222, NULL },
-  { "k",                                 500, NULL },
-  { "l",                                 222, NULL },
-  { "m",                                 833, NULL },
-  { "n",                                 556, NULL },
-  { "tcommaaccent",                      278, NULL },
-  { "o",                                 556, NULL },
-  { "ordfeminine",                       370, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 556, NULL },
-  { "q",                                 556, NULL },
-  { "uhungarumlaut",                     556, NULL },
-  { "r",                                 333, NULL },
-  { "twosuperior",                       333, NULL },
-  { "aacute",                            556, NULL },
-  { "s",                                 500, NULL },
-  { "OE",                               1000, NULL },
-  { "t",                                 278, NULL },
-  { "divide",                            584, NULL },
-  { "u",                                 556, NULL },
-  { "Ccaron",                            722, NULL },
-  { "v",                                 500, NULL },
-  { "w",                                 722, NULL },
-  { "x",                                 500, NULL },
-  { "y",                                 500, NULL },
-  { "z",                                 500, NULL },
-  { "Gbreve",                            778, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        278, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          355, NULL },
-  { "gcommaaccent",                      556, NULL },
-  { "mu",                                556, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            667, NULL },
-  { "Lslash",                            556, NULL },
-  { "semicolon",                         278, NULL },
-  { "oslash",                            611, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           471, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            500, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            556, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         556, NULL },
-  { "nacute",                            556, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            778, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            500, NULL },
-  { "AE",                               1000, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            222, NULL },
-  { "quotedblleft",                      333, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       191, NULL },
-  { "eight",                             556, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            556, NULL },
-  { "oe",                                944, NULL },
-  { "Abreve",                            667, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       556, NULL },
-  { "Adieresis",                         667, NULL },
-  { "copyright",                         737, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            556, NULL },
-  { "Idieresis",                         278, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               556, NULL },
-  { "emacron",                           556, NULL },
-  { "Odieresis",                         778, NULL },
-  { "ucircumflex",                       556, NULL },
-  { "bracketleft",                       278, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        222, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         667, NULL },
-  { "umacron",                           556, NULL },
-  { "abreve",                            556, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         556, NULL },
-  { "egrave",                            556, NULL },
-  { "edieresis",                         556, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                889, NULL },
-  { "asterisk",                          389, NULL },
-  { "odieresis",                         556, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            556, NULL },
-  { "nine",                              556, NULL },
-  { "five",                              556, NULL },
-  { "udieresis",                         556, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      667, NULL },
-  { "threequarters",                     834, NULL },
-  { "guillemotright",                    556, NULL },
-  { "Ccedilla",                          722, NULL },
-  { "ydieresis",                         500, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                               1015, NULL },
-  { "eacute",                            556, NULL },
-  { "underscore",                        556, NULL },
-  { "Euro",                              556, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          584, NULL },
-  { "zero",                              556, NULL },
-  { "eth",                               556, NULL },
-  { "Scedilla",                          667, NULL },
-  { "Ograve",                            778, NULL },
-  { "Racute",                            722, NULL },
-  { "partialdiff",                       476, NULL },
-  { "uacute",                            556, NULL },
-  { "braceleft",                         334, NULL },
-  { "Thorn",                             667, NULL },
-  { "zcaron",                            500, NULL },
-  { "scommaaccent",                      500, NULL },
-  { "ccedilla",                          500, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            556, NULL },
-  { "Ocircumflex",                       778, NULL },
-  { "Oacute",                            778, NULL },
-  { "scedilla",                          500, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            556, NULL },
-  { "racute",                            333, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             556, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        737, NULL },
-  { "radical",                           453, NULL },
-  { "Aring",                             667, NULL },
-  { "percent",                           889, NULL },
-  { "six",                               556, NULL },
-  { "paragraph",                         537, NULL },
-  { "dcaron",                            643, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               556, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            278, NULL },
-  { "Lacute",                            556, NULL },
-  { "ocircumflex",                       556, NULL },
-  { "oacute",                            556, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      556, NULL },
-  { "tcaron",                            317, NULL },
-  { "eogonek",                           556, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     778, NULL },
-  { "asciicircum",                       469, NULL },
-  { "aring",                             556, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           556, NULL },
-  { "bracketright",                      278, NULL },
-  { "Iacute",                            278, NULL },
-  { "ampersand",                         667, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            222, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              584, NULL },
-  { "uring",                             556, NULL },
-  { "quotesinglbase",                    222, NULL },
-  { "lcommaaccent",                      222, NULL },
-  { "Yacute",                            667, NULL },
-  { "ohungarumlaut",                     556, NULL },
-  { "threesuperior",                     333, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           556, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      333, NULL },
-  { "ncaron",                            556, NULL },
-  { "florin",                            556, NULL },
-  { "yacute",                            500, NULL },
-  { "Rcommaaccent",                      722, NULL },
-  { "fi",                                500, NULL },
-  { "fl",                                500, NULL },
-  { "Acircumflex",                       667, NULL },
-  { "Cacute",                            722, NULL },
-  { "Icircumflex",                       278, NULL },
-  { "guillemotleft",                     556, NULL },
-  { "germandbls",                        611, NULL },
-  { "Amacron",                           667, NULL },
-  { "seven",                             556, NULL },
-  { "Sacute",                            667, NULL },
-  { "ordmasculine",                      365, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          556, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           278, NULL },
-  { "rcommaaccent",                      333, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       556, NULL },
-  { "cacute",                            500, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        334, NULL },
-  { "quotedblright",                     333, NULL },
-  { "amacron",                           556, NULL },
-  { "sacute",                            500, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              556, NULL },
-  { "currency",                          556, NULL },
-  { "logicalnot",                        584, NULL },
-  { "zdotaccent",                        500, NULL },
-  { "Atilde",                            667, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               260, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              584, NULL },
-  { "ecaron",                            556, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            278, NULL },
-  { "period",                            278, NULL },
-  { "Rcaron",                            722, NULL },
-  { "Kcommaaccent",                      667, NULL },
-  { "greater",                           584, NULL },
-  { "atilde",                            556, NULL },
-  { "brokenbar",                         260, NULL },
-  { "quoteleft",                         222, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       333, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            333, nullptr },
+  { "kcommaaccent",                      500, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             278, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         584, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        556, nullptr },
+  { "asciitilde",                        584, nullptr },
+  { "colon",                             278, nullptr },
+  { "onehalf",                           834, nullptr },
+  { "dollar",                            556, nullptr },
+  { "Lcaron",                            556, nullptr },
+  { "ntilde",                            556, nullptr },
+  { "Aogonek",                           667, nullptr },
+  { "ncommaaccent",                      556, nullptr },
+  { "minus",                             584, nullptr },
+  { "Iogonek",                           278, nullptr },
+  { "zacute",                            500, nullptr },
+  { "yen",                               556, nullptr },
+  { "space",                             278, nullptr },
+  { "Omacron",                           778, nullptr },
+  { "questiondown",                      611, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            667, nullptr },
+  { "three",                             556, nullptr },
+  { "numbersign",                        556, nullptr },
+  { "lcaron",                            299, nullptr },
+  { "A",                                 667, nullptr },
+  { "B",                                 667, nullptr },
+  { "C",                                 722, nullptr },
+  { "aogonek",                           556, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        834, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 778, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 278, nullptr },
+  { "J",                                 500, nullptr },
+  { "K",                                 667, nullptr },
+  { "iogonek",                           222, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 556, nullptr },
+  { "periodcentered",                    278, nullptr },
+  { "M",                                 833, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           556, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 778, nullptr },
+  { "P",                                 667, nullptr },
+  { "Q",                                 778, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 722, nullptr },
+  { "Aacute",                            667, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 667, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            556, nullptr },
+  { "V",                                 667, nullptr },
+  { "W",                                 944, nullptr },
+  { "X",                                 667, nullptr },
+  { "question",                          556, nullptr },
+  { "equal",                             584, nullptr },
+  { "Y",                                 667, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              556, nullptr },
+  { "a",                                 556, nullptr },
+  { "Gcommaaccent",                      778, nullptr },
+  { "b",                                 556, nullptr },
+  { "c",                                 500, nullptr },
+  { "d",                                 556, nullptr },
+  { "e",                                 556, nullptr },
+  { "f",                                 278, nullptr },
+  { "g",                                 556, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 556, nullptr },
+  { "i",                                 222, nullptr },
+  { "Oslash",                            778, nullptr },
+  { "dagger",                            556, nullptr },
+  { "j",                                 222, nullptr },
+  { "k",                                 500, nullptr },
+  { "l",                                 222, nullptr },
+  { "m",                                 833, nullptr },
+  { "n",                                 556, nullptr },
+  { "tcommaaccent",                      278, nullptr },
+  { "o",                                 556, nullptr },
+  { "ordfeminine",                       370, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 556, nullptr },
+  { "q",                                 556, nullptr },
+  { "uhungarumlaut",                     556, nullptr },
+  { "r",                                 333, nullptr },
+  { "twosuperior",                       333, nullptr },
+  { "aacute",                            556, nullptr },
+  { "s",                                 500, nullptr },
+  { "OE",                               1000, nullptr },
+  { "t",                                 278, nullptr },
+  { "divide",                            584, nullptr },
+  { "u",                                 556, nullptr },
+  { "Ccaron",                            722, nullptr },
+  { "v",                                 500, nullptr },
+  { "w",                                 722, nullptr },
+  { "x",                                 500, nullptr },
+  { "y",                                 500, nullptr },
+  { "z",                                 500, nullptr },
+  { "Gbreve",                            778, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        278, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          355, nullptr },
+  { "gcommaaccent",                      556, nullptr },
+  { "mu",                                556, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            667, nullptr },
+  { "Lslash",                            556, nullptr },
+  { "semicolon",                         278, nullptr },
+  { "oslash",                            611, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           471, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            500, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            556, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         556, nullptr },
+  { "nacute",                            556, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            778, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            500, nullptr },
+  { "AE",                               1000, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            222, nullptr },
+  { "quotedblleft",                      333, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       191, nullptr },
+  { "eight",                             556, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            556, nullptr },
+  { "oe",                                944, nullptr },
+  { "Abreve",                            667, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       556, nullptr },
+  { "Adieresis",                         667, nullptr },
+  { "copyright",                         737, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            556, nullptr },
+  { "Idieresis",                         278, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               556, nullptr },
+  { "emacron",                           556, nullptr },
+  { "Odieresis",                         778, nullptr },
+  { "ucircumflex",                       556, nullptr },
+  { "bracketleft",                       278, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        222, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         667, nullptr },
+  { "umacron",                           556, nullptr },
+  { "abreve",                            556, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         556, nullptr },
+  { "egrave",                            556, nullptr },
+  { "edieresis",                         556, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                889, nullptr },
+  { "asterisk",                          389, nullptr },
+  { "odieresis",                         556, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            556, nullptr },
+  { "nine",                              556, nullptr },
+  { "five",                              556, nullptr },
+  { "udieresis",                         556, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      667, nullptr },
+  { "threequarters",                     834, nullptr },
+  { "guillemotright",                    556, nullptr },
+  { "Ccedilla",                          722, nullptr },
+  { "ydieresis",                         500, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                               1015, nullptr },
+  { "eacute",                            556, nullptr },
+  { "underscore",                        556, nullptr },
+  { "Euro",                              556, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          584, nullptr },
+  { "zero",                              556, nullptr },
+  { "eth",                               556, nullptr },
+  { "Scedilla",                          667, nullptr },
+  { "Ograve",                            778, nullptr },
+  { "Racute",                            722, nullptr },
+  { "partialdiff",                       476, nullptr },
+  { "uacute",                            556, nullptr },
+  { "braceleft",                         334, nullptr },
+  { "Thorn",                             667, nullptr },
+  { "zcaron",                            500, nullptr },
+  { "scommaaccent",                      500, nullptr },
+  { "ccedilla",                          500, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            556, nullptr },
+  { "Ocircumflex",                       778, nullptr },
+  { "Oacute",                            778, nullptr },
+  { "scedilla",                          500, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            556, nullptr },
+  { "racute",                            333, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             556, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        737, nullptr },
+  { "radical",                           453, nullptr },
+  { "Aring",                             667, nullptr },
+  { "percent",                           889, nullptr },
+  { "six",                               556, nullptr },
+  { "paragraph",                         537, nullptr },
+  { "dcaron",                            643, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               556, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            278, nullptr },
+  { "Lacute",                            556, nullptr },
+  { "ocircumflex",                       556, nullptr },
+  { "oacute",                            556, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      556, nullptr },
+  { "tcaron",                            317, nullptr },
+  { "eogonek",                           556, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     778, nullptr },
+  { "asciicircum",                       469, nullptr },
+  { "aring",                             556, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           556, nullptr },
+  { "bracketright",                      278, nullptr },
+  { "Iacute",                            278, nullptr },
+  { "ampersand",                         667, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            222, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              584, nullptr },
+  { "uring",                             556, nullptr },
+  { "quotesinglbase",                    222, nullptr },
+  { "lcommaaccent",                      222, nullptr },
+  { "Yacute",                            667, nullptr },
+  { "ohungarumlaut",                     556, nullptr },
+  { "threesuperior",                     333, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           556, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      333, nullptr },
+  { "ncaron",                            556, nullptr },
+  { "florin",                            556, nullptr },
+  { "yacute",                            500, nullptr },
+  { "Rcommaaccent",                      722, nullptr },
+  { "fi",                                500, nullptr },
+  { "fl",                                500, nullptr },
+  { "Acircumflex",                       667, nullptr },
+  { "Cacute",                            722, nullptr },
+  { "Icircumflex",                       278, nullptr },
+  { "guillemotleft",                     556, nullptr },
+  { "germandbls",                        611, nullptr },
+  { "Amacron",                           667, nullptr },
+  { "seven",                             556, nullptr },
+  { "Sacute",                            667, nullptr },
+  { "ordmasculine",                      365, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          556, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           278, nullptr },
+  { "rcommaaccent",                      333, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       556, nullptr },
+  { "cacute",                            500, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        334, nullptr },
+  { "quotedblright",                     333, nullptr },
+  { "amacron",                           556, nullptr },
+  { "sacute",                            500, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              556, nullptr },
+  { "currency",                          556, nullptr },
+  { "logicalnot",                        584, nullptr },
+  { "zdotaccent",                        500, nullptr },
+  { "Atilde",                            667, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               260, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              584, nullptr },
+  { "ecaron",                            556, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            278, nullptr },
+  { "period",                            278, nullptr },
+  { "Rcaron",                            722, nullptr },
+  { "Kcommaaccent",                      667, nullptr },
+  { "greater",                           584, nullptr },
+  { "atilde",                            556, nullptr },
+  { "brokenbar",                         260, nullptr },
+  { "quoteleft",                         222, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       333, nullptr }
 };
 
 static BuiltinFontWidth symbolWidthsTab[] = {
-  { "bracketleftex",                     384, NULL },
-  { "alpha",                             631, NULL },
-  { "union",                             768, NULL },
-  { "infinity",                          713, NULL },
-  { "comma",                             250, NULL },
-  { "copyrightsans",                     790, NULL },
-  { "plusminus",                         549, NULL },
-  { "arrowup",                           603, NULL },
-  { "apple",                             790, NULL },
-  { "parenleftbt",                       384, NULL },
-  { "notelement",                        713, NULL },
-  { "colon",                             278, NULL },
-  { "beta",                              549, NULL },
-  { "braceleftbt",                       494, NULL },
-  { "Lambda",                            686, NULL },
-  { "Phi",                               763, NULL },
-  { "minus",                             549, NULL },
-  { "space",                             250, NULL },
-  { "Sigma",                             592, NULL },
-  { "approxequal",                       549, NULL },
-  { "minute",                            247, NULL },
-  { "circleplus",                        768, NULL },
-  { "Omicron",                           722, NULL },
-  { "three",                             500, NULL },
-  { "numbersign",                        500, NULL },
-  { "lambda",                            549, NULL },
-  { "phi",                               521, NULL },
-  { "aleph",                             823, NULL },
-  { "Tau",                               611, NULL },
-  { "spade",                             753, NULL },
-  { "logicaland",                        603, NULL },
-  { "sigma",                             603, NULL },
-  { "propersuperset",                    713, NULL },
-  { "omicron",                           549, NULL },
-  { "question",                          444, NULL },
-  { "equal",                             549, NULL },
-  { "Epsilon",                           611, NULL },
-  { "emptyset",                          823, NULL },
-  { "diamond",                           753, NULL },
-  { "four",                              500, NULL },
-  { "Mu",                                889, NULL },
-  { "parenlefttp",                       384, NULL },
-  { "club",                              753, NULL },
-  { "bullet",                            460, NULL },
-  { "Omega",                             768, NULL },
-  { "tau",                               439, NULL },
-  { "Upsilon",                           690, NULL },
-  { "bracelefttp",                       494, NULL },
-  { "heart",                             753, NULL },
-  { "divide",                            549, NULL },
-  { "epsilon",                           439, NULL },
-  { "logicalor",                         603, NULL },
-  { "parenleftex",                       384, NULL },
-  { "greaterequal",                      549, NULL },
-  { "mu",                                576, NULL },
-  { "Nu",                                722, NULL },
-  { "therefore",                         863, NULL },
-  { "notsubset",                         713, NULL },
-  { "omega",                             686, NULL },
-  { "semicolon",                         278, NULL },
-  { "element",                           713, NULL },
-  { "upsilon",                           576, NULL },
-  { "existential",                       549, NULL },
-  { "integralbt",                        686, NULL },
-  { "lessequal",                         549, NULL },
-  { "phi1",                              603, NULL },
-  { "lozenge",                           494, NULL },
-  { "trademarkserif",                    890, NULL },
-  { "parenright",                        333, NULL },
-  { "reflexsuperset",                    713, NULL },
-  { "sigma1",                            439, NULL },
-  { "nu",                                521, NULL },
-  { "Gamma",                             603, NULL },
-  { "angleright",                        329, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "Rho",                               556, NULL },
-  { "parenrightbt",                      384, NULL },
-  { "radicalex",                         500, NULL },
-  { "eight",                             500, NULL },
-  { "angleleft",                         329, NULL },
-  { "arrowdbldown",                      603, NULL },
-  { "congruent",                         549, NULL },
-  { "Theta",                             741, NULL },
-  { "intersection",                      768, NULL },
-  { "Pi",                                768, NULL },
-  { "slash",                             278, NULL },
-  { "registerserif",                     790, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               500, NULL },
-  { "gamma",                             411, NULL },
-  { "bracketleft",                       333, NULL },
-  { "rho",                               549, NULL },
-  { "circlemultiply",                    768, NULL },
-  { "Chi",                               722, NULL },
-  { "theta",                             521, NULL },
-  { "pi",                                549, NULL },
-  { "integraltp",                        686, NULL },
-  { "Eta",                               722, NULL },
-  { "product",                           823, NULL },
-  { "nine",                              500, NULL },
-  { "five",                              500, NULL },
-  { "propersubset",                      713, NULL },
-  { "bracketrightbt",                    384, NULL },
-  { "trademarksans",                     786, NULL },
-  { "dotmath",                           250, NULL },
-  { "integralex",                        686, NULL },
-  { "chi",                               549, NULL },
-  { "parenrighttp",                      384, NULL },
-  { "eta",                               603, NULL },
-  { "underscore",                        500, NULL },
-  { "Euro",                              750, NULL },
-  { "multiply",                          549, NULL },
-  { "zero",                              500, NULL },
-  { "partialdiff",                       494, NULL },
-  { "angle",                             768, NULL },
-  { "arrowdblleft",                      987, NULL },
-  { "braceleft",                         480, NULL },
-  { "parenrightex",                      384, NULL },
-  { "Rfraktur",                          795, NULL },
-  { "Zeta",                              611, NULL },
-  { "braceex",                           494, NULL },
-  { "arrowdblup",                        603, NULL },
-  { "arrowdown",                         603, NULL },
-  { "Ifraktur",                          686, NULL },
-  { "degree",                            400, NULL },
-  { "Iota",                              333, NULL },
-  { "perpendicular",                     658, NULL },
-  { "radical",                           549, NULL },
-  { "asteriskmath",                      500, NULL },
-  { "percent",                           833, NULL },
-  { "zeta",                              494, NULL },
-  { "six",                               500, NULL },
-  { "two",                               500, NULL },
-  { "weierstrass",                       987, NULL },
-  { "summation",                         713, NULL },
-  { "bracketrighttp",                    384, NULL },
-  { "carriagereturn",                    658, NULL },
-  { "suchthat",                          439, NULL },
-  { "arrowvertex",                       603, NULL },
-  { "Delta",                             612, NULL },
-  { "iota",                              329, NULL },
-  { "arrowhorizex",                     1000, NULL },
-  { "bracketrightex",                    384, NULL },
-  { "bracketright",                      333, NULL },
-  { "ampersand",                         778, NULL },
-  { "plus",                              549, NULL },
-  { "proportional",                      713, NULL },
-  { "delta",                             494, NULL },
-  { "copyrightserif",                    790, NULL },
-  { "bracerightmid",                     494, NULL },
-  { "arrowleft",                         987, NULL },
-  { "second",                            411, NULL },
-  { "arrowdblboth",                     1042, NULL },
-  { "florin",                            500, NULL },
-  { "Psi",                               795, NULL },
-  { "bracerightbt",                      494, NULL },
-  { "bracketleftbt",                     384, NULL },
-  { "seven",                             500, NULL },
-  { "braceleftmid",                      494, NULL },
-  { "notequal",                          549, NULL },
-  { "psi",                               686, NULL },
-  { "equivalence",                       549, NULL },
-  { "universal",                         713, NULL },
-  { "arrowdblright",                     987, NULL },
-  { "braceright",                        480, NULL },
-  { "reflexsubset",                      713, NULL },
-  { "Xi",                                645, NULL },
-  { "theta1",                            631, NULL },
-  { "logicalnot",                        713, NULL },
-  { "Kappa",                             722, NULL },
-  { "similar",                           549, NULL },
-  { "bar",                               200, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              549, NULL },
-  { "registersans",                      790, NULL },
-  { "omega1",                            713, NULL },
-  { "exclam",                            333, NULL },
-  { "Upsilon1",                          620, NULL },
-  { "bracerighttp",                      494, NULL },
-  { "xi",                                493, NULL },
-  { "period",                            250, NULL },
-  { "Alpha",                             722, NULL },
-  { "arrowright",                        987, NULL },
-  { "greater",                           549, NULL },
-  { "bracketlefttp",                     384, NULL },
-  { "kappa",                             549, NULL },
-  { "gradient",                          713, NULL },
-  { "integral",                          274, NULL },
-  { "arrowboth",                        1042, NULL },
-  { "Beta",                              667, NULL }
+  { "bracketleftex",                     384, nullptr },
+  { "alpha",                             631, nullptr },
+  { "union",                             768, nullptr },
+  { "infinity",                          713, nullptr },
+  { "comma",                             250, nullptr },
+  { "copyrightsans",                     790, nullptr },
+  { "plusminus",                         549, nullptr },
+  { "arrowup",                           603, nullptr },
+  { "apple",                             790, nullptr },
+  { "parenleftbt",                       384, nullptr },
+  { "notelement",                        713, nullptr },
+  { "colon",                             278, nullptr },
+  { "beta",                              549, nullptr },
+  { "braceleftbt",                       494, nullptr },
+  { "Lambda",                            686, nullptr },
+  { "Phi",                               763, nullptr },
+  { "minus",                             549, nullptr },
+  { "space",                             250, nullptr },
+  { "Sigma",                             592, nullptr },
+  { "approxequal",                       549, nullptr },
+  { "minute",                            247, nullptr },
+  { "circleplus",                        768, nullptr },
+  { "Omicron",                           722, nullptr },
+  { "three",                             500, nullptr },
+  { "numbersign",                        500, nullptr },
+  { "lambda",                            549, nullptr },
+  { "phi",                               521, nullptr },
+  { "aleph",                             823, nullptr },
+  { "Tau",                               611, nullptr },
+  { "spade",                             753, nullptr },
+  { "logicaland",                        603, nullptr },
+  { "sigma",                             603, nullptr },
+  { "propersuperset",                    713, nullptr },
+  { "omicron",                           549, nullptr },
+  { "question",                          444, nullptr },
+  { "equal",                             549, nullptr },
+  { "Epsilon",                           611, nullptr },
+  { "emptyset",                          823, nullptr },
+  { "diamond",                           753, nullptr },
+  { "four",                              500, nullptr },
+  { "Mu",                                889, nullptr },
+  { "parenlefttp",                       384, nullptr },
+  { "club",                              753, nullptr },
+  { "bullet",                            460, nullptr },
+  { "Omega",                             768, nullptr },
+  { "tau",                               439, nullptr },
+  { "Upsilon",                           690, nullptr },
+  { "bracelefttp",                       494, nullptr },
+  { "heart",                             753, nullptr },
+  { "divide",                            549, nullptr },
+  { "epsilon",                           439, nullptr },
+  { "logicalor",                         603, nullptr },
+  { "parenleftex",                       384, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "mu",                                576, nullptr },
+  { "Nu",                                722, nullptr },
+  { "therefore",                         863, nullptr },
+  { "notsubset",                         713, nullptr },
+  { "omega",                             686, nullptr },
+  { "semicolon",                         278, nullptr },
+  { "element",                           713, nullptr },
+  { "upsilon",                           576, nullptr },
+  { "existential",                       549, nullptr },
+  { "integralbt",                        686, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "phi1",                              603, nullptr },
+  { "lozenge",                           494, nullptr },
+  { "trademarkserif",                    890, nullptr },
+  { "parenright",                        333, nullptr },
+  { "reflexsuperset",                    713, nullptr },
+  { "sigma1",                            439, nullptr },
+  { "nu",                                521, nullptr },
+  { "Gamma",                             603, nullptr },
+  { "angleright",                        329, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "Rho",                               556, nullptr },
+  { "parenrightbt",                      384, nullptr },
+  { "radicalex",                         500, nullptr },
+  { "eight",                             500, nullptr },
+  { "angleleft",                         329, nullptr },
+  { "arrowdbldown",                      603, nullptr },
+  { "congruent",                         549, nullptr },
+  { "Theta",                             741, nullptr },
+  { "intersection",                      768, nullptr },
+  { "Pi",                                768, nullptr },
+  { "slash",                             278, nullptr },
+  { "registerserif",                     790, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               500, nullptr },
+  { "gamma",                             411, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "rho",                               549, nullptr },
+  { "circlemultiply",                    768, nullptr },
+  { "Chi",                               722, nullptr },
+  { "theta",                             521, nullptr },
+  { "pi",                                549, nullptr },
+  { "integraltp",                        686, nullptr },
+  { "Eta",                               722, nullptr },
+  { "product",                           823, nullptr },
+  { "nine",                              500, nullptr },
+  { "five",                              500, nullptr },
+  { "propersubset",                      713, nullptr },
+  { "bracketrightbt",                    384, nullptr },
+  { "trademarksans",                     786, nullptr },
+  { "dotmath",                           250, nullptr },
+  { "integralex",                        686, nullptr },
+  { "chi",                               549, nullptr },
+  { "parenrighttp",                      384, nullptr },
+  { "eta",                               603, nullptr },
+  { "underscore",                        500, nullptr },
+  { "Euro",                              750, nullptr },
+  { "multiply",                          549, nullptr },
+  { "zero",                              500, nullptr },
+  { "partialdiff",                       494, nullptr },
+  { "angle",                             768, nullptr },
+  { "arrowdblleft",                      987, nullptr },
+  { "braceleft",                         480, nullptr },
+  { "parenrightex",                      384, nullptr },
+  { "Rfraktur",                          795, nullptr },
+  { "Zeta",                              611, nullptr },
+  { "braceex",                           494, nullptr },
+  { "arrowdblup",                        603, nullptr },
+  { "arrowdown",                         603, nullptr },
+  { "Ifraktur",                          686, nullptr },
+  { "degree",                            400, nullptr },
+  { "Iota",                              333, nullptr },
+  { "perpendicular",                     658, nullptr },
+  { "radical",                           549, nullptr },
+  { "asteriskmath",                      500, nullptr },
+  { "percent",                           833, nullptr },
+  { "zeta",                              494, nullptr },
+  { "six",                               500, nullptr },
+  { "two",                               500, nullptr },
+  { "weierstrass",                       987, nullptr },
+  { "summation",                         713, nullptr },
+  { "bracketrighttp",                    384, nullptr },
+  { "carriagereturn",                    658, nullptr },
+  { "suchthat",                          439, nullptr },
+  { "arrowvertex",                       603, nullptr },
+  { "Delta",                             612, nullptr },
+  { "iota",                              329, nullptr },
+  { "arrowhorizex",                     1000, nullptr },
+  { "bracketrightex",                    384, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "ampersand",                         778, nullptr },
+  { "plus",                              549, nullptr },
+  { "proportional",                      713, nullptr },
+  { "delta",                             494, nullptr },
+  { "copyrightserif",                    790, nullptr },
+  { "bracerightmid",                     494, nullptr },
+  { "arrowleft",                         987, nullptr },
+  { "second",                            411, nullptr },
+  { "arrowdblboth",                     1042, nullptr },
+  { "florin",                            500, nullptr },
+  { "Psi",                               795, nullptr },
+  { "bracerightbt",                      494, nullptr },
+  { "bracketleftbt",                     384, nullptr },
+  { "seven",                             500, nullptr },
+  { "braceleftmid",                      494, nullptr },
+  { "notequal",                          549, nullptr },
+  { "psi",                               686, nullptr },
+  { "equivalence",                       549, nullptr },
+  { "universal",                         713, nullptr },
+  { "arrowdblright",                     987, nullptr },
+  { "braceright",                        480, nullptr },
+  { "reflexsubset",                      713, nullptr },
+  { "Xi",                                645, nullptr },
+  { "theta1",                            631, nullptr },
+  { "logicalnot",                        713, nullptr },
+  { "Kappa",                             722, nullptr },
+  { "similar",                           549, nullptr },
+  { "bar",                               200, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              549, nullptr },
+  { "registersans",                      790, nullptr },
+  { "omega1",                            713, nullptr },
+  { "exclam",                            333, nullptr },
+  { "Upsilon1",                          620, nullptr },
+  { "bracerighttp",                      494, nullptr },
+  { "xi",                                493, nullptr },
+  { "period",                            250, nullptr },
+  { "Alpha",                             722, nullptr },
+  { "arrowright",                        987, nullptr },
+  { "greater",                           549, nullptr },
+  { "bracketlefttp",                     384, nullptr },
+  { "kappa",                             549, nullptr },
+  { "gradient",                          713, nullptr },
+  { "integral",                          274, nullptr },
+  { "arrowboth",                        1042, nullptr },
+  { "Beta",                              667, nullptr }
 };
 
 static BuiltinFontWidth timesBoldWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            444, NULL },
-  { "kcommaaccent",                      556, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            667, NULL },
-  { "comma",                             250, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         570, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        444, NULL },
-  { "asciitilde",                        520, NULL },
-  { "colon",                             333, NULL },
-  { "onehalf",                           750, NULL },
-  { "dollar",                            500, NULL },
-  { "Lcaron",                            667, NULL },
-  { "ntilde",                            556, NULL },
-  { "Aogonek",                           722, NULL },
-  { "ncommaaccent",                      556, NULL },
-  { "minus",                             570, NULL },
-  { "Iogonek",                           389, NULL },
-  { "zacute",                            444, NULL },
-  { "yen",                               500, NULL },
-  { "space",                             250, NULL },
-  { "Omacron",                           778, NULL },
-  { "questiondown",                      500, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            722, NULL },
-  { "three",                             500, NULL },
-  { "numbersign",                        500, NULL },
-  { "lcaron",                            394, NULL },
-  { "A",                                 722, NULL },
-  { "B",                                 667, NULL },
-  { "C",                                 722, NULL },
-  { "aogonek",                           500, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        750, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 778, NULL },
-  { "H",                                 778, NULL },
-  { "I",                                 389, NULL },
-  { "J",                                 500, NULL },
-  { "K",                                 778, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 667, NULL },
-  { "periodcentered",                    250, NULL },
-  { "M",                                 944, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           500, NULL },
-  { "Tcommaaccent",                      667, NULL },
-  { "O",                                 778, NULL },
-  { "P",                                 611, NULL },
-  { "Q",                                 778, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 722, NULL },
-  { "Aacute",                            722, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 556, NULL },
-  { "T",                                 667, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            500, NULL },
-  { "V",                                 722, NULL },
-  { "W",                                1000, NULL },
-  { "X",                                 722, NULL },
-  { "question",                          500, NULL },
-  { "equal",                             570, NULL },
-  { "Y",                                 722, NULL },
-  { "Z",                                 667, NULL },
-  { "four",                              500, NULL },
-  { "a",                                 500, NULL },
-  { "Gcommaaccent",                      778, NULL },
-  { "b",                                 556, NULL },
-  { "c",                                 444, NULL },
-  { "d",                                 556, NULL },
-  { "e",                                 444, NULL },
-  { "f",                                 333, NULL },
-  { "g",                                 500, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 556, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            778, NULL },
-  { "dagger",                            500, NULL },
-  { "j",                                 333, NULL },
-  { "k",                                 556, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 833, NULL },
-  { "n",                                 556, NULL },
-  { "tcommaaccent",                      333, NULL },
-  { "o",                                 500, NULL },
-  { "ordfeminine",                       300, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 556, NULL },
-  { "q",                                 556, NULL },
-  { "uhungarumlaut",                     556, NULL },
-  { "r",                                 444, NULL },
-  { "twosuperior",                       300, NULL },
-  { "aacute",                            500, NULL },
-  { "s",                                 389, NULL },
-  { "OE",                               1000, NULL },
-  { "t",                                 333, NULL },
-  { "divide",                            570, NULL },
-  { "u",                                 556, NULL },
-  { "Ccaron",                            722, NULL },
-  { "v",                                 500, NULL },
-  { "w",                                 722, NULL },
-  { "x",                                 500, NULL },
-  { "y",                                 500, NULL },
-  { "z",                                 444, NULL },
-  { "Gbreve",                            778, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        389, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          555, NULL },
-  { "gcommaaccent",                      500, NULL },
-  { "mu",                                556, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            556, NULL },
-  { "Lslash",                            667, NULL },
-  { "semicolon",                         333, NULL },
-  { "oslash",                            500, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           494, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            444, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            500, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         500, NULL },
-  { "nacute",                            556, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            778, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            389, NULL },
-  { "AE",                               1000, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      500, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       278, NULL },
-  { "eight",                             500, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            500, NULL },
-  { "oe",                                722, NULL },
-  { "Abreve",                            722, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       444, NULL },
-  { "Adieresis",                         722, NULL },
-  { "copyright",                         747, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            500, NULL },
-  { "Idieresis",                         389, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               500, NULL },
-  { "emacron",                           444, NULL },
-  { "Odieresis",                         778, NULL },
-  { "ucircumflex",                       556, NULL },
-  { "bracketleft",                       333, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        333, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         722, NULL },
-  { "umacron",                           556, NULL },
-  { "abreve",                            500, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         500, NULL },
-  { "egrave",                            444, NULL },
-  { "edieresis",                         444, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                722, NULL },
-  { "asterisk",                          500, NULL },
-  { "odieresis",                         500, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            556, NULL },
-  { "nine",                              500, NULL },
-  { "five",                              500, NULL },
-  { "udieresis",                         556, NULL },
-  { "Zcaron",                            667, NULL },
-  { "Scommaaccent",                      556, NULL },
-  { "threequarters",                     750, NULL },
-  { "guillemotright",                    500, NULL },
-  { "Ccedilla",                          722, NULL },
-  { "ydieresis",                         500, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                                930, NULL },
-  { "eacute",                            444, NULL },
-  { "underscore",                        500, NULL },
-  { "Euro",                              500, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          570, NULL },
-  { "zero",                              500, NULL },
-  { "eth",                               500, NULL },
-  { "Scedilla",                          556, NULL },
-  { "Ograve",                            778, NULL },
-  { "Racute",                            722, NULL },
-  { "partialdiff",                       494, NULL },
-  { "uacute",                            556, NULL },
-  { "braceleft",                         394, NULL },
-  { "Thorn",                             611, NULL },
-  { "zcaron",                            444, NULL },
-  { "scommaaccent",                      389, NULL },
-  { "ccedilla",                          444, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            556, NULL },
-  { "Ocircumflex",                       778, NULL },
-  { "Oacute",                            778, NULL },
-  { "scedilla",                          389, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            500, NULL },
-  { "racute",                            444, NULL },
-  { "Tcaron",                            667, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             556, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        747, NULL },
-  { "radical",                           549, NULL },
-  { "Aring",                             722, NULL },
-  { "percent",                          1000, NULL },
-  { "six",                               500, NULL },
-  { "paragraph",                         540, NULL },
-  { "dcaron",                            672, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               500, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            389, NULL },
-  { "Lacute",                            667, NULL },
-  { "ocircumflex",                       500, NULL },
-  { "oacute",                            500, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      667, NULL },
-  { "tcaron",                            416, NULL },
-  { "eogonek",                           444, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     778, NULL },
-  { "asciicircum",                       581, NULL },
-  { "aring",                             500, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           556, NULL },
-  { "bracketright",                      333, NULL },
-  { "Iacute",                            389, NULL },
-  { "ampersand",                         833, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              570, NULL },
-  { "uring",                             556, NULL },
-  { "quotesinglbase",                    333, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            722, NULL },
-  { "ohungarumlaut",                     500, NULL },
-  { "threesuperior",                     300, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           500, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      500, NULL },
-  { "ncaron",                            556, NULL },
-  { "florin",                            500, NULL },
-  { "yacute",                            500, NULL },
-  { "Rcommaaccent",                      722, NULL },
-  { "fi",                                556, NULL },
-  { "fl",                                556, NULL },
-  { "Acircumflex",                       722, NULL },
-  { "Cacute",                            722, NULL },
-  { "Icircumflex",                       389, NULL },
-  { "guillemotleft",                     500, NULL },
-  { "germandbls",                        556, NULL },
-  { "Amacron",                           722, NULL },
-  { "seven",                             500, NULL },
-  { "Sacute",                            556, NULL },
-  { "ordmasculine",                      330, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          500, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           389, NULL },
-  { "rcommaaccent",                      444, NULL },
-  { "Zdotaccent",                        667, NULL },
-  { "acircumflex",                       500, NULL },
-  { "cacute",                            444, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        394, NULL },
-  { "quotedblright",                     500, NULL },
-  { "amacron",                           500, NULL },
-  { "sacute",                            389, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              500, NULL },
-  { "currency",                          500, NULL },
-  { "logicalnot",                        570, NULL },
-  { "zdotaccent",                        444, NULL },
-  { "Atilde",                            722, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               220, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              570, NULL },
-  { "ecaron",                            444, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            333, NULL },
-  { "period",                            250, NULL },
-  { "Rcaron",                            722, NULL },
-  { "Kcommaaccent",                      778, NULL },
-  { "greater",                           570, NULL },
-  { "atilde",                            500, NULL },
-  { "brokenbar",                         220, NULL },
-  { "quoteleft",                         333, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       300, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            444, nullptr },
+  { "kcommaaccent",                      556, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            667, nullptr },
+  { "comma",                             250, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         570, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        444, nullptr },
+  { "asciitilde",                        520, nullptr },
+  { "colon",                             333, nullptr },
+  { "onehalf",                           750, nullptr },
+  { "dollar",                            500, nullptr },
+  { "Lcaron",                            667, nullptr },
+  { "ntilde",                            556, nullptr },
+  { "Aogonek",                           722, nullptr },
+  { "ncommaaccent",                      556, nullptr },
+  { "minus",                             570, nullptr },
+  { "Iogonek",                           389, nullptr },
+  { "zacute",                            444, nullptr },
+  { "yen",                               500, nullptr },
+  { "space",                             250, nullptr },
+  { "Omacron",                           778, nullptr },
+  { "questiondown",                      500, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            722, nullptr },
+  { "three",                             500, nullptr },
+  { "numbersign",                        500, nullptr },
+  { "lcaron",                            394, nullptr },
+  { "A",                                 722, nullptr },
+  { "B",                                 667, nullptr },
+  { "C",                                 722, nullptr },
+  { "aogonek",                           500, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        750, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 778, nullptr },
+  { "H",                                 778, nullptr },
+  { "I",                                 389, nullptr },
+  { "J",                                 500, nullptr },
+  { "K",                                 778, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 667, nullptr },
+  { "periodcentered",                    250, nullptr },
+  { "M",                                 944, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           500, nullptr },
+  { "Tcommaaccent",                      667, nullptr },
+  { "O",                                 778, nullptr },
+  { "P",                                 611, nullptr },
+  { "Q",                                 778, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 722, nullptr },
+  { "Aacute",                            722, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 556, nullptr },
+  { "T",                                 667, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            500, nullptr },
+  { "V",                                 722, nullptr },
+  { "W",                                1000, nullptr },
+  { "X",                                 722, nullptr },
+  { "question",                          500, nullptr },
+  { "equal",                             570, nullptr },
+  { "Y",                                 722, nullptr },
+  { "Z",                                 667, nullptr },
+  { "four",                              500, nullptr },
+  { "a",                                 500, nullptr },
+  { "Gcommaaccent",                      778, nullptr },
+  { "b",                                 556, nullptr },
+  { "c",                                 444, nullptr },
+  { "d",                                 556, nullptr },
+  { "e",                                 444, nullptr },
+  { "f",                                 333, nullptr },
+  { "g",                                 500, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 556, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            778, nullptr },
+  { "dagger",                            500, nullptr },
+  { "j",                                 333, nullptr },
+  { "k",                                 556, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 833, nullptr },
+  { "n",                                 556, nullptr },
+  { "tcommaaccent",                      333, nullptr },
+  { "o",                                 500, nullptr },
+  { "ordfeminine",                       300, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 556, nullptr },
+  { "q",                                 556, nullptr },
+  { "uhungarumlaut",                     556, nullptr },
+  { "r",                                 444, nullptr },
+  { "twosuperior",                       300, nullptr },
+  { "aacute",                            500, nullptr },
+  { "s",                                 389, nullptr },
+  { "OE",                               1000, nullptr },
+  { "t",                                 333, nullptr },
+  { "divide",                            570, nullptr },
+  { "u",                                 556, nullptr },
+  { "Ccaron",                            722, nullptr },
+  { "v",                                 500, nullptr },
+  { "w",                                 722, nullptr },
+  { "x",                                 500, nullptr },
+  { "y",                                 500, nullptr },
+  { "z",                                 444, nullptr },
+  { "Gbreve",                            778, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        389, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          555, nullptr },
+  { "gcommaaccent",                      500, nullptr },
+  { "mu",                                556, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            556, nullptr },
+  { "Lslash",                            667, nullptr },
+  { "semicolon",                         333, nullptr },
+  { "oslash",                            500, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           494, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            444, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            500, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         500, nullptr },
+  { "nacute",                            556, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            778, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            389, nullptr },
+  { "AE",                               1000, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      500, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       278, nullptr },
+  { "eight",                             500, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            500, nullptr },
+  { "oe",                                722, nullptr },
+  { "Abreve",                            722, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       444, nullptr },
+  { "Adieresis",                         722, nullptr },
+  { "copyright",                         747, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            500, nullptr },
+  { "Idieresis",                         389, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               500, nullptr },
+  { "emacron",                           444, nullptr },
+  { "Odieresis",                         778, nullptr },
+  { "ucircumflex",                       556, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        333, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         722, nullptr },
+  { "umacron",                           556, nullptr },
+  { "abreve",                            500, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         500, nullptr },
+  { "egrave",                            444, nullptr },
+  { "edieresis",                         444, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                722, nullptr },
+  { "asterisk",                          500, nullptr },
+  { "odieresis",                         500, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            556, nullptr },
+  { "nine",                              500, nullptr },
+  { "five",                              500, nullptr },
+  { "udieresis",                         556, nullptr },
+  { "Zcaron",                            667, nullptr },
+  { "Scommaaccent",                      556, nullptr },
+  { "threequarters",                     750, nullptr },
+  { "guillemotright",                    500, nullptr },
+  { "Ccedilla",                          722, nullptr },
+  { "ydieresis",                         500, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                                930, nullptr },
+  { "eacute",                            444, nullptr },
+  { "underscore",                        500, nullptr },
+  { "Euro",                              500, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          570, nullptr },
+  { "zero",                              500, nullptr },
+  { "eth",                               500, nullptr },
+  { "Scedilla",                          556, nullptr },
+  { "Ograve",                            778, nullptr },
+  { "Racute",                            722, nullptr },
+  { "partialdiff",                       494, nullptr },
+  { "uacute",                            556, nullptr },
+  { "braceleft",                         394, nullptr },
+  { "Thorn",                             611, nullptr },
+  { "zcaron",                            444, nullptr },
+  { "scommaaccent",                      389, nullptr },
+  { "ccedilla",                          444, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            556, nullptr },
+  { "Ocircumflex",                       778, nullptr },
+  { "Oacute",                            778, nullptr },
+  { "scedilla",                          389, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            500, nullptr },
+  { "racute",                            444, nullptr },
+  { "Tcaron",                            667, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             556, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        747, nullptr },
+  { "radical",                           549, nullptr },
+  { "Aring",                             722, nullptr },
+  { "percent",                          1000, nullptr },
+  { "six",                               500, nullptr },
+  { "paragraph",                         540, nullptr },
+  { "dcaron",                            672, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               500, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            389, nullptr },
+  { "Lacute",                            667, nullptr },
+  { "ocircumflex",                       500, nullptr },
+  { "oacute",                            500, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      667, nullptr },
+  { "tcaron",                            416, nullptr },
+  { "eogonek",                           444, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     778, nullptr },
+  { "asciicircum",                       581, nullptr },
+  { "aring",                             500, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           556, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "Iacute",                            389, nullptr },
+  { "ampersand",                         833, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              570, nullptr },
+  { "uring",                             556, nullptr },
+  { "quotesinglbase",                    333, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            722, nullptr },
+  { "ohungarumlaut",                     500, nullptr },
+  { "threesuperior",                     300, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           500, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      500, nullptr },
+  { "ncaron",                            556, nullptr },
+  { "florin",                            500, nullptr },
+  { "yacute",                            500, nullptr },
+  { "Rcommaaccent",                      722, nullptr },
+  { "fi",                                556, nullptr },
+  { "fl",                                556, nullptr },
+  { "Acircumflex",                       722, nullptr },
+  { "Cacute",                            722, nullptr },
+  { "Icircumflex",                       389, nullptr },
+  { "guillemotleft",                     500, nullptr },
+  { "germandbls",                        556, nullptr },
+  { "Amacron",                           722, nullptr },
+  { "seven",                             500, nullptr },
+  { "Sacute",                            556, nullptr },
+  { "ordmasculine",                      330, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          500, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           389, nullptr },
+  { "rcommaaccent",                      444, nullptr },
+  { "Zdotaccent",                        667, nullptr },
+  { "acircumflex",                       500, nullptr },
+  { "cacute",                            444, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        394, nullptr },
+  { "quotedblright",                     500, nullptr },
+  { "amacron",                           500, nullptr },
+  { "sacute",                            389, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              500, nullptr },
+  { "currency",                          500, nullptr },
+  { "logicalnot",                        570, nullptr },
+  { "zdotaccent",                        444, nullptr },
+  { "Atilde",                            722, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               220, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              570, nullptr },
+  { "ecaron",                            444, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            333, nullptr },
+  { "period",                            250, nullptr },
+  { "Rcaron",                            722, nullptr },
+  { "Kcommaaccent",                      778, nullptr },
+  { "greater",                           570, nullptr },
+  { "atilde",                            500, nullptr },
+  { "brokenbar",                         220, nullptr },
+  { "quoteleft",                         333, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       300, nullptr }
 };
 
 static BuiltinFontWidth timesBoldItalicWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            389, NULL },
-  { "kcommaaccent",                      500, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             250, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         570, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        444, NULL },
-  { "asciitilde",                        570, NULL },
-  { "colon",                             333, NULL },
-  { "onehalf",                           750, NULL },
-  { "dollar",                            500, NULL },
-  { "Lcaron",                            611, NULL },
-  { "ntilde",                            556, NULL },
-  { "Aogonek",                           667, NULL },
-  { "ncommaaccent",                      556, NULL },
-  { "minus",                             606, NULL },
-  { "Iogonek",                           389, NULL },
-  { "zacute",                            389, NULL },
-  { "yen",                               500, NULL },
-  { "space",                             250, NULL },
-  { "Omacron",                           722, NULL },
-  { "questiondown",                      500, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            667, NULL },
-  { "three",                             500, NULL },
-  { "numbersign",                        500, NULL },
-  { "lcaron",                            382, NULL },
-  { "A",                                 667, NULL },
-  { "B",                                 667, NULL },
-  { "C",                                 667, NULL },
-  { "aogonek",                           500, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 667, NULL },
-  { "onequarter",                        750, NULL },
-  { "F",                                 667, NULL },
-  { "G",                                 722, NULL },
-  { "H",                                 778, NULL },
-  { "I",                                 389, NULL },
-  { "J",                                 500, NULL },
-  { "K",                                 667, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 611, NULL },
-  { "periodcentered",                    250, NULL },
-  { "M",                                 889, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           500, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 722, NULL },
-  { "P",                                 611, NULL },
-  { "Q",                                 722, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 667, NULL },
-  { "Aacute",                            667, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 556, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            500, NULL },
-  { "V",                                 667, NULL },
-  { "W",                                 889, NULL },
-  { "X",                                 667, NULL },
-  { "question",                          500, NULL },
-  { "equal",                             570, NULL },
-  { "Y",                                 611, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              500, NULL },
-  { "a",                                 500, NULL },
-  { "Gcommaaccent",                      722, NULL },
-  { "b",                                 500, NULL },
-  { "c",                                 444, NULL },
-  { "d",                                 500, NULL },
-  { "e",                                 444, NULL },
-  { "f",                                 333, NULL },
-  { "g",                                 500, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 556, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            722, NULL },
-  { "dagger",                            500, NULL },
-  { "j",                                 278, NULL },
-  { "k",                                 500, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 778, NULL },
-  { "n",                                 556, NULL },
-  { "tcommaaccent",                      278, NULL },
-  { "o",                                 500, NULL },
-  { "ordfeminine",                       266, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 500, NULL },
-  { "q",                                 500, NULL },
-  { "uhungarumlaut",                     556, NULL },
-  { "r",                                 389, NULL },
-  { "twosuperior",                       300, NULL },
-  { "aacute",                            500, NULL },
-  { "s",                                 389, NULL },
-  { "OE",                                944, NULL },
-  { "t",                                 278, NULL },
-  { "divide",                            570, NULL },
-  { "u",                                 556, NULL },
-  { "Ccaron",                            667, NULL },
-  { "v",                                 444, NULL },
-  { "w",                                 667, NULL },
-  { "x",                                 500, NULL },
-  { "y",                                 444, NULL },
-  { "z",                                 389, NULL },
-  { "Gbreve",                            722, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        389, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          555, NULL },
-  { "gcommaaccent",                      500, NULL },
-  { "mu",                                576, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            556, NULL },
-  { "Lslash",                            611, NULL },
-  { "semicolon",                         333, NULL },
-  { "oslash",                            500, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           494, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            444, NULL },
-  { "Ecircumflex",                       667, NULL },
-  { "gbreve",                            500, NULL },
-  { "trademark",                        1000, NULL },
-  { "daggerdbl",                         500, NULL },
-  { "nacute",                            556, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            722, NULL },
-  { "Emacron",                           667, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            389, NULL },
-  { "AE",                                944, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      500, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       278, NULL },
-  { "eight",                             500, NULL },
-  { "exclamdown",                        389, NULL },
-  { "endash",                            500, NULL },
-  { "oe",                                722, NULL },
-  { "Abreve",                            667, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       444, NULL },
-  { "Adieresis",                         667, NULL },
-  { "copyright",                         747, NULL },
-  { "Egrave",                            667, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         667, NULL },
-  { "otilde",                            500, NULL },
-  { "Idieresis",                         389, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               500, NULL },
-  { "emacron",                           444, NULL },
-  { "Odieresis",                         722, NULL },
-  { "ucircumflex",                       556, NULL },
-  { "bracketleft",                       333, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        333, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         611, NULL },
-  { "umacron",                           556, NULL },
-  { "abreve",                            500, NULL },
-  { "Eacute",                            667, NULL },
-  { "adieresis",                         500, NULL },
-  { "egrave",                            444, NULL },
-  { "edieresis",                         444, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                722, NULL },
-  { "asterisk",                          500, NULL },
-  { "odieresis",                         500, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            556, NULL },
-  { "nine",                              500, NULL },
-  { "five",                              500, NULL },
-  { "udieresis",                         556, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      556, NULL },
-  { "threequarters",                     750, NULL },
-  { "guillemotright",                    500, NULL },
-  { "Ccedilla",                          667, NULL },
-  { "ydieresis",                         444, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                                832, NULL },
-  { "eacute",                            444, NULL },
-  { "underscore",                        500, NULL },
-  { "Euro",                              500, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          570, NULL },
-  { "zero",                              500, NULL },
-  { "eth",                               500, NULL },
-  { "Scedilla",                          556, NULL },
-  { "Ograve",                            722, NULL },
-  { "Racute",                            667, NULL },
-  { "partialdiff",                       494, NULL },
-  { "uacute",                            556, NULL },
-  { "braceleft",                         348, NULL },
-  { "Thorn",                             611, NULL },
-  { "zcaron",                            389, NULL },
-  { "scommaaccent",                      389, NULL },
-  { "ccedilla",                          444, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            500, NULL },
-  { "Ocircumflex",                       722, NULL },
-  { "Oacute",                            722, NULL },
-  { "scedilla",                          389, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            500, NULL },
-  { "racute",                            389, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           667, NULL },
-  { "thorn",                             500, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        747, NULL },
-  { "radical",                           549, NULL },
-  { "Aring",                             667, NULL },
-  { "percent",                           833, NULL },
-  { "six",                               500, NULL },
-  { "paragraph",                         500, NULL },
-  { "dcaron",                            608, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               500, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            389, NULL },
-  { "Lacute",                            611, NULL },
-  { "ocircumflex",                       500, NULL },
-  { "oacute",                            500, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      611, NULL },
-  { "tcaron",                            366, NULL },
-  { "eogonek",                           444, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     722, NULL },
-  { "asciicircum",                       570, NULL },
-  { "aring",                             500, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           556, NULL },
-  { "bracketright",                      333, NULL },
-  { "Iacute",                            389, NULL },
-  { "ampersand",                         778, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              570, NULL },
-  { "uring",                             556, NULL },
-  { "quotesinglbase",                    333, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            611, NULL },
-  { "ohungarumlaut",                     500, NULL },
-  { "threesuperior",                     300, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           500, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      500, NULL },
-  { "ncaron",                            556, NULL },
-  { "florin",                            500, NULL },
-  { "yacute",                            444, NULL },
-  { "Rcommaaccent",                      667, NULL },
-  { "fi",                                556, NULL },
-  { "fl",                                556, NULL },
-  { "Acircumflex",                       667, NULL },
-  { "Cacute",                            667, NULL },
-  { "Icircumflex",                       389, NULL },
-  { "guillemotleft",                     500, NULL },
-  { "germandbls",                        500, NULL },
-  { "Amacron",                           667, NULL },
-  { "seven",                             500, NULL },
-  { "Sacute",                            556, NULL },
-  { "ordmasculine",                      300, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          500, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           389, NULL },
-  { "rcommaaccent",                      389, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       500, NULL },
-  { "cacute",                            444, NULL },
-  { "Ecaron",                            667, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        348, NULL },
-  { "quotedblright",                     500, NULL },
-  { "amacron",                           500, NULL },
-  { "sacute",                            389, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              500, NULL },
-  { "currency",                          500, NULL },
-  { "logicalnot",                        606, NULL },
-  { "zdotaccent",                        389, NULL },
-  { "Atilde",                            667, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               220, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              570, NULL },
-  { "ecaron",                            444, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            389, NULL },
-  { "period",                            250, NULL },
-  { "Rcaron",                            667, NULL },
-  { "Kcommaaccent",                      667, NULL },
-  { "greater",                           570, NULL },
-  { "atilde",                            500, NULL },
-  { "brokenbar",                         220, NULL },
-  { "quoteleft",                         333, NULL },
-  { "Edotaccent",                        667, NULL },
-  { "onesuperior",                       300, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            389, nullptr },
+  { "kcommaaccent",                      500, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             250, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         570, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        444, nullptr },
+  { "asciitilde",                        570, nullptr },
+  { "colon",                             333, nullptr },
+  { "onehalf",                           750, nullptr },
+  { "dollar",                            500, nullptr },
+  { "Lcaron",                            611, nullptr },
+  { "ntilde",                            556, nullptr },
+  { "Aogonek",                           667, nullptr },
+  { "ncommaaccent",                      556, nullptr },
+  { "minus",                             606, nullptr },
+  { "Iogonek",                           389, nullptr },
+  { "zacute",                            389, nullptr },
+  { "yen",                               500, nullptr },
+  { "space",                             250, nullptr },
+  { "Omacron",                           722, nullptr },
+  { "questiondown",                      500, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            667, nullptr },
+  { "three",                             500, nullptr },
+  { "numbersign",                        500, nullptr },
+  { "lcaron",                            382, nullptr },
+  { "A",                                 667, nullptr },
+  { "B",                                 667, nullptr },
+  { "C",                                 667, nullptr },
+  { "aogonek",                           500, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 667, nullptr },
+  { "onequarter",                        750, nullptr },
+  { "F",                                 667, nullptr },
+  { "G",                                 722, nullptr },
+  { "H",                                 778, nullptr },
+  { "I",                                 389, nullptr },
+  { "J",                                 500, nullptr },
+  { "K",                                 667, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 611, nullptr },
+  { "periodcentered",                    250, nullptr },
+  { "M",                                 889, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           500, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 722, nullptr },
+  { "P",                                 611, nullptr },
+  { "Q",                                 722, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 667, nullptr },
+  { "Aacute",                            667, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 556, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            500, nullptr },
+  { "V",                                 667, nullptr },
+  { "W",                                 889, nullptr },
+  { "X",                                 667, nullptr },
+  { "question",                          500, nullptr },
+  { "equal",                             570, nullptr },
+  { "Y",                                 611, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              500, nullptr },
+  { "a",                                 500, nullptr },
+  { "Gcommaaccent",                      722, nullptr },
+  { "b",                                 500, nullptr },
+  { "c",                                 444, nullptr },
+  { "d",                                 500, nullptr },
+  { "e",                                 444, nullptr },
+  { "f",                                 333, nullptr },
+  { "g",                                 500, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 556, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            722, nullptr },
+  { "dagger",                            500, nullptr },
+  { "j",                                 278, nullptr },
+  { "k",                                 500, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 778, nullptr },
+  { "n",                                 556, nullptr },
+  { "tcommaaccent",                      278, nullptr },
+  { "o",                                 500, nullptr },
+  { "ordfeminine",                       266, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 500, nullptr },
+  { "q",                                 500, nullptr },
+  { "uhungarumlaut",                     556, nullptr },
+  { "r",                                 389, nullptr },
+  { "twosuperior",                       300, nullptr },
+  { "aacute",                            500, nullptr },
+  { "s",                                 389, nullptr },
+  { "OE",                                944, nullptr },
+  { "t",                                 278, nullptr },
+  { "divide",                            570, nullptr },
+  { "u",                                 556, nullptr },
+  { "Ccaron",                            667, nullptr },
+  { "v",                                 444, nullptr },
+  { "w",                                 667, nullptr },
+  { "x",                                 500, nullptr },
+  { "y",                                 444, nullptr },
+  { "z",                                 389, nullptr },
+  { "Gbreve",                            722, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        389, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          555, nullptr },
+  { "gcommaaccent",                      500, nullptr },
+  { "mu",                                576, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            556, nullptr },
+  { "Lslash",                            611, nullptr },
+  { "semicolon",                         333, nullptr },
+  { "oslash",                            500, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           494, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            444, nullptr },
+  { "Ecircumflex",                       667, nullptr },
+  { "gbreve",                            500, nullptr },
+  { "trademark",                        1000, nullptr },
+  { "daggerdbl",                         500, nullptr },
+  { "nacute",                            556, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            722, nullptr },
+  { "Emacron",                           667, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            389, nullptr },
+  { "AE",                                944, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      500, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       278, nullptr },
+  { "eight",                             500, nullptr },
+  { "exclamdown",                        389, nullptr },
+  { "endash",                            500, nullptr },
+  { "oe",                                722, nullptr },
+  { "Abreve",                            667, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       444, nullptr },
+  { "Adieresis",                         667, nullptr },
+  { "copyright",                         747, nullptr },
+  { "Egrave",                            667, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         667, nullptr },
+  { "otilde",                            500, nullptr },
+  { "Idieresis",                         389, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               500, nullptr },
+  { "emacron",                           444, nullptr },
+  { "Odieresis",                         722, nullptr },
+  { "ucircumflex",                       556, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        333, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         611, nullptr },
+  { "umacron",                           556, nullptr },
+  { "abreve",                            500, nullptr },
+  { "Eacute",                            667, nullptr },
+  { "adieresis",                         500, nullptr },
+  { "egrave",                            444, nullptr },
+  { "edieresis",                         444, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                722, nullptr },
+  { "asterisk",                          500, nullptr },
+  { "odieresis",                         500, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            556, nullptr },
+  { "nine",                              500, nullptr },
+  { "five",                              500, nullptr },
+  { "udieresis",                         556, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      556, nullptr },
+  { "threequarters",                     750, nullptr },
+  { "guillemotright",                    500, nullptr },
+  { "Ccedilla",                          667, nullptr },
+  { "ydieresis",                         444, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                                832, nullptr },
+  { "eacute",                            444, nullptr },
+  { "underscore",                        500, nullptr },
+  { "Euro",                              500, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          570, nullptr },
+  { "zero",                              500, nullptr },
+  { "eth",                               500, nullptr },
+  { "Scedilla",                          556, nullptr },
+  { "Ograve",                            722, nullptr },
+  { "Racute",                            667, nullptr },
+  { "partialdiff",                       494, nullptr },
+  { "uacute",                            556, nullptr },
+  { "braceleft",                         348, nullptr },
+  { "Thorn",                             611, nullptr },
+  { "zcaron",                            389, nullptr },
+  { "scommaaccent",                      389, nullptr },
+  { "ccedilla",                          444, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            500, nullptr },
+  { "Ocircumflex",                       722, nullptr },
+  { "Oacute",                            722, nullptr },
+  { "scedilla",                          389, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            500, nullptr },
+  { "racute",                            389, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           667, nullptr },
+  { "thorn",                             500, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        747, nullptr },
+  { "radical",                           549, nullptr },
+  { "Aring",                             667, nullptr },
+  { "percent",                           833, nullptr },
+  { "six",                               500, nullptr },
+  { "paragraph",                         500, nullptr },
+  { "dcaron",                            608, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               500, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            389, nullptr },
+  { "Lacute",                            611, nullptr },
+  { "ocircumflex",                       500, nullptr },
+  { "oacute",                            500, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      611, nullptr },
+  { "tcaron",                            366, nullptr },
+  { "eogonek",                           444, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     722, nullptr },
+  { "asciicircum",                       570, nullptr },
+  { "aring",                             500, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           556, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "Iacute",                            389, nullptr },
+  { "ampersand",                         778, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              570, nullptr },
+  { "uring",                             556, nullptr },
+  { "quotesinglbase",                    333, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            611, nullptr },
+  { "ohungarumlaut",                     500, nullptr },
+  { "threesuperior",                     300, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           500, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      500, nullptr },
+  { "ncaron",                            556, nullptr },
+  { "florin",                            500, nullptr },
+  { "yacute",                            444, nullptr },
+  { "Rcommaaccent",                      667, nullptr },
+  { "fi",                                556, nullptr },
+  { "fl",                                556, nullptr },
+  { "Acircumflex",                       667, nullptr },
+  { "Cacute",                            667, nullptr },
+  { "Icircumflex",                       389, nullptr },
+  { "guillemotleft",                     500, nullptr },
+  { "germandbls",                        500, nullptr },
+  { "Amacron",                           667, nullptr },
+  { "seven",                             500, nullptr },
+  { "Sacute",                            556, nullptr },
+  { "ordmasculine",                      300, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          500, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           389, nullptr },
+  { "rcommaaccent",                      389, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       500, nullptr },
+  { "cacute",                            444, nullptr },
+  { "Ecaron",                            667, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        348, nullptr },
+  { "quotedblright",                     500, nullptr },
+  { "amacron",                           500, nullptr },
+  { "sacute",                            389, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              500, nullptr },
+  { "currency",                          500, nullptr },
+  { "logicalnot",                        606, nullptr },
+  { "zdotaccent",                        389, nullptr },
+  { "Atilde",                            667, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               220, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              570, nullptr },
+  { "ecaron",                            444, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            389, nullptr },
+  { "period",                            250, nullptr },
+  { "Rcaron",                            667, nullptr },
+  { "Kcommaaccent",                      667, nullptr },
+  { "greater",                           570, nullptr },
+  { "atilde",                            500, nullptr },
+  { "brokenbar",                         220, nullptr },
+  { "quoteleft",                         333, nullptr },
+  { "Edotaccent",                        667, nullptr },
+  { "onesuperior",                       300, nullptr }
 };
 
 static BuiltinFontWidth timesItalicWidthsTab[] = {
-  { "Ntilde",                            667, NULL },
-  { "rcaron",                            389, NULL },
-  { "kcommaaccent",                      444, NULL },
-  { "Ncommaaccent",                      667, NULL },
-  { "Zacute",                            556, NULL },
-  { "comma",                             250, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         675, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        444, NULL },
-  { "asciitilde",                        541, NULL },
-  { "colon",                             333, NULL },
-  { "onehalf",                           750, NULL },
-  { "dollar",                            500, NULL },
-  { "Lcaron",                            611, NULL },
-  { "ntilde",                            500, NULL },
-  { "Aogonek",                           611, NULL },
-  { "ncommaaccent",                      500, NULL },
-  { "minus",                             675, NULL },
-  { "Iogonek",                           333, NULL },
-  { "zacute",                            389, NULL },
-  { "yen",                               500, NULL },
-  { "space",                             250, NULL },
-  { "Omacron",                           722, NULL },
-  { "questiondown",                      500, NULL },
-  { "emdash",                            889, NULL },
-  { "Agrave",                            611, NULL },
-  { "three",                             500, NULL },
-  { "numbersign",                        500, NULL },
-  { "lcaron",                            300, NULL },
-  { "A",                                 611, NULL },
-  { "B",                                 611, NULL },
-  { "C",                                 667, NULL },
-  { "aogonek",                           500, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 611, NULL },
-  { "onequarter",                        750, NULL },
-  { "F",                                 611, NULL },
-  { "G",                                 722, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 333, NULL },
-  { "J",                                 444, NULL },
-  { "K",                                 667, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 556, NULL },
-  { "periodcentered",                    250, NULL },
-  { "M",                                 833, NULL },
-  { "N",                                 667, NULL },
-  { "omacron",                           500, NULL },
-  { "Tcommaaccent",                      556, NULL },
-  { "O",                                 722, NULL },
-  { "P",                                 611, NULL },
-  { "Q",                                 722, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 611, NULL },
-  { "Aacute",                            611, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 500, NULL },
-  { "T",                                 556, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            500, NULL },
-  { "V",                                 611, NULL },
-  { "W",                                 833, NULL },
-  { "X",                                 611, NULL },
-  { "question",                          500, NULL },
-  { "equal",                             675, NULL },
-  { "Y",                                 556, NULL },
-  { "Z",                                 556, NULL },
-  { "four",                              500, NULL },
-  { "a",                                 500, NULL },
-  { "Gcommaaccent",                      722, NULL },
-  { "b",                                 500, NULL },
-  { "c",                                 444, NULL },
-  { "d",                                 500, NULL },
-  { "e",                                 444, NULL },
-  { "f",                                 278, NULL },
-  { "g",                                 500, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 500, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            722, NULL },
-  { "dagger",                            500, NULL },
-  { "j",                                 278, NULL },
-  { "k",                                 444, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 722, NULL },
-  { "n",                                 500, NULL },
-  { "tcommaaccent",                      278, NULL },
-  { "o",                                 500, NULL },
-  { "ordfeminine",                       276, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 500, NULL },
-  { "q",                                 500, NULL },
-  { "uhungarumlaut",                     500, NULL },
-  { "r",                                 389, NULL },
-  { "twosuperior",                       300, NULL },
-  { "aacute",                            500, NULL },
-  { "s",                                 389, NULL },
-  { "OE",                                944, NULL },
-  { "t",                                 278, NULL },
-  { "divide",                            675, NULL },
-  { "u",                                 500, NULL },
-  { "Ccaron",                            667, NULL },
-  { "v",                                 444, NULL },
-  { "w",                                 667, NULL },
-  { "x",                                 444, NULL },
-  { "y",                                 444, NULL },
-  { "z",                                 389, NULL },
-  { "Gbreve",                            722, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        333, NULL },
-  { "Nacute",                            667, NULL },
-  { "quotedbl",                          420, NULL },
-  { "gcommaaccent",                      500, NULL },
-  { "mu",                                500, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            500, NULL },
-  { "Lslash",                            556, NULL },
-  { "semicolon",                         333, NULL },
-  { "oslash",                            500, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           471, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            444, NULL },
-  { "Ecircumflex",                       611, NULL },
-  { "gbreve",                            500, NULL },
-  { "trademark",                         980, NULL },
-  { "daggerdbl",                         500, NULL },
-  { "nacute",                            500, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            722, NULL },
-  { "Emacron",                           611, NULL },
-  { "ellipsis",                          889, NULL },
-  { "scaron",                            389, NULL },
-  { "AE",                                889, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      556, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       214, NULL },
-  { "eight",                             500, NULL },
-  { "exclamdown",                        389, NULL },
-  { "endash",                            500, NULL },
-  { "oe",                                667, NULL },
-  { "Abreve",                            611, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       444, NULL },
-  { "Adieresis",                         611, NULL },
-  { "copyright",                         760, NULL },
-  { "Egrave",                            611, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         611, NULL },
-  { "otilde",                            500, NULL },
-  { "Idieresis",                         333, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               500, NULL },
-  { "emacron",                           444, NULL },
-  { "Odieresis",                         722, NULL },
-  { "ucircumflex",                       500, NULL },
-  { "bracketleft",                       389, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        333, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         556, NULL },
-  { "umacron",                           500, NULL },
-  { "abreve",                            500, NULL },
-  { "Eacute",                            611, NULL },
-  { "adieresis",                         500, NULL },
-  { "egrave",                            444, NULL },
-  { "edieresis",                         444, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                667, NULL },
-  { "asterisk",                          500, NULL },
-  { "odieresis",                         500, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            500, NULL },
-  { "nine",                              500, NULL },
-  { "five",                              500, NULL },
-  { "udieresis",                         500, NULL },
-  { "Zcaron",                            556, NULL },
-  { "Scommaaccent",                      500, NULL },
-  { "threequarters",                     750, NULL },
-  { "guillemotright",                    500, NULL },
-  { "Ccedilla",                          667, NULL },
-  { "ydieresis",                         444, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                                920, NULL },
-  { "eacute",                            444, NULL },
-  { "underscore",                        500, NULL },
-  { "Euro",                              500, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          675, NULL },
-  { "zero",                              500, NULL },
-  { "eth",                               500, NULL },
-  { "Scedilla",                          500, NULL },
-  { "Ograve",                            722, NULL },
-  { "Racute",                            611, NULL },
-  { "partialdiff",                       476, NULL },
-  { "uacute",                            500, NULL },
-  { "braceleft",                         400, NULL },
-  { "Thorn",                             611, NULL },
-  { "zcaron",                            389, NULL },
-  { "scommaaccent",                      389, NULL },
-  { "ccedilla",                          444, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            500, NULL },
-  { "Ocircumflex",                       722, NULL },
-  { "Oacute",                            722, NULL },
-  { "scedilla",                          389, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            500, NULL },
-  { "racute",                            389, NULL },
-  { "Tcaron",                            556, NULL },
-  { "Eogonek",                           611, NULL },
-  { "thorn",                             500, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        760, NULL },
-  { "radical",                           453, NULL },
-  { "Aring",                             611, NULL },
-  { "percent",                           833, NULL },
-  { "six",                               500, NULL },
-  { "paragraph",                         523, NULL },
-  { "dcaron",                            544, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               500, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            333, NULL },
-  { "Lacute",                            556, NULL },
-  { "ocircumflex",                       500, NULL },
-  { "oacute",                            500, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      556, NULL },
-  { "tcaron",                            300, NULL },
-  { "eogonek",                           444, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     722, NULL },
-  { "asciicircum",                       422, NULL },
-  { "aring",                             500, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           500, NULL },
-  { "bracketright",                      389, NULL },
-  { "Iacute",                            333, NULL },
-  { "ampersand",                         778, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            667, NULL },
-  { "plus",                              675, NULL },
-  { "uring",                             500, NULL },
-  { "quotesinglbase",                    333, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            556, NULL },
-  { "ohungarumlaut",                     500, NULL },
-  { "threesuperior",                     300, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           500, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      556, NULL },
-  { "ncaron",                            500, NULL },
-  { "florin",                            500, NULL },
-  { "yacute",                            444, NULL },
-  { "Rcommaaccent",                      611, NULL },
-  { "fi",                                500, NULL },
-  { "fl",                                500, NULL },
-  { "Acircumflex",                       611, NULL },
-  { "Cacute",                            667, NULL },
-  { "Icircumflex",                       333, NULL },
-  { "guillemotleft",                     500, NULL },
-  { "germandbls",                        500, NULL },
-  { "Amacron",                           611, NULL },
-  { "seven",                             500, NULL },
-  { "Sacute",                            500, NULL },
-  { "ordmasculine",                      310, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          500, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           333, NULL },
-  { "rcommaaccent",                      389, NULL },
-  { "Zdotaccent",                        556, NULL },
-  { "acircumflex",                       500, NULL },
-  { "cacute",                            444, NULL },
-  { "Ecaron",                            611, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        400, NULL },
-  { "quotedblright",                     556, NULL },
-  { "amacron",                           500, NULL },
-  { "sacute",                            389, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              500, NULL },
-  { "currency",                          500, NULL },
-  { "logicalnot",                        675, NULL },
-  { "zdotaccent",                        389, NULL },
-  { "Atilde",                            611, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               275, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              675, NULL },
-  { "ecaron",                            444, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            333, NULL },
-  { "period",                            250, NULL },
-  { "Rcaron",                            611, NULL },
-  { "Kcommaaccent",                      667, NULL },
-  { "greater",                           675, NULL },
-  { "atilde",                            500, NULL },
-  { "brokenbar",                         275, NULL },
-  { "quoteleft",                         333, NULL },
-  { "Edotaccent",                        611, NULL },
-  { "onesuperior",                       300, NULL }
+  { "Ntilde",                            667, nullptr },
+  { "rcaron",                            389, nullptr },
+  { "kcommaaccent",                      444, nullptr },
+  { "Ncommaaccent",                      667, nullptr },
+  { "Zacute",                            556, nullptr },
+  { "comma",                             250, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         675, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        444, nullptr },
+  { "asciitilde",                        541, nullptr },
+  { "colon",                             333, nullptr },
+  { "onehalf",                           750, nullptr },
+  { "dollar",                            500, nullptr },
+  { "Lcaron",                            611, nullptr },
+  { "ntilde",                            500, nullptr },
+  { "Aogonek",                           611, nullptr },
+  { "ncommaaccent",                      500, nullptr },
+  { "minus",                             675, nullptr },
+  { "Iogonek",                           333, nullptr },
+  { "zacute",                            389, nullptr },
+  { "yen",                               500, nullptr },
+  { "space",                             250, nullptr },
+  { "Omacron",                           722, nullptr },
+  { "questiondown",                      500, nullptr },
+  { "emdash",                            889, nullptr },
+  { "Agrave",                            611, nullptr },
+  { "three",                             500, nullptr },
+  { "numbersign",                        500, nullptr },
+  { "lcaron",                            300, nullptr },
+  { "A",                                 611, nullptr },
+  { "B",                                 611, nullptr },
+  { "C",                                 667, nullptr },
+  { "aogonek",                           500, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 611, nullptr },
+  { "onequarter",                        750, nullptr },
+  { "F",                                 611, nullptr },
+  { "G",                                 722, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 333, nullptr },
+  { "J",                                 444, nullptr },
+  { "K",                                 667, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 556, nullptr },
+  { "periodcentered",                    250, nullptr },
+  { "M",                                 833, nullptr },
+  { "N",                                 667, nullptr },
+  { "omacron",                           500, nullptr },
+  { "Tcommaaccent",                      556, nullptr },
+  { "O",                                 722, nullptr },
+  { "P",                                 611, nullptr },
+  { "Q",                                 722, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 611, nullptr },
+  { "Aacute",                            611, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 500, nullptr },
+  { "T",                                 556, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            500, nullptr },
+  { "V",                                 611, nullptr },
+  { "W",                                 833, nullptr },
+  { "X",                                 611, nullptr },
+  { "question",                          500, nullptr },
+  { "equal",                             675, nullptr },
+  { "Y",                                 556, nullptr },
+  { "Z",                                 556, nullptr },
+  { "four",                              500, nullptr },
+  { "a",                                 500, nullptr },
+  { "Gcommaaccent",                      722, nullptr },
+  { "b",                                 500, nullptr },
+  { "c",                                 444, nullptr },
+  { "d",                                 500, nullptr },
+  { "e",                                 444, nullptr },
+  { "f",                                 278, nullptr },
+  { "g",                                 500, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 500, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            722, nullptr },
+  { "dagger",                            500, nullptr },
+  { "j",                                 278, nullptr },
+  { "k",                                 444, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 722, nullptr },
+  { "n",                                 500, nullptr },
+  { "tcommaaccent",                      278, nullptr },
+  { "o",                                 500, nullptr },
+  { "ordfeminine",                       276, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 500, nullptr },
+  { "q",                                 500, nullptr },
+  { "uhungarumlaut",                     500, nullptr },
+  { "r",                                 389, nullptr },
+  { "twosuperior",                       300, nullptr },
+  { "aacute",                            500, nullptr },
+  { "s",                                 389, nullptr },
+  { "OE",                                944, nullptr },
+  { "t",                                 278, nullptr },
+  { "divide",                            675, nullptr },
+  { "u",                                 500, nullptr },
+  { "Ccaron",                            667, nullptr },
+  { "v",                                 444, nullptr },
+  { "w",                                 667, nullptr },
+  { "x",                                 444, nullptr },
+  { "y",                                 444, nullptr },
+  { "z",                                 389, nullptr },
+  { "Gbreve",                            722, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        333, nullptr },
+  { "Nacute",                            667, nullptr },
+  { "quotedbl",                          420, nullptr },
+  { "gcommaaccent",                      500, nullptr },
+  { "mu",                                500, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            500, nullptr },
+  { "Lslash",                            556, nullptr },
+  { "semicolon",                         333, nullptr },
+  { "oslash",                            500, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           471, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            444, nullptr },
+  { "Ecircumflex",                       611, nullptr },
+  { "gbreve",                            500, nullptr },
+  { "trademark",                         980, nullptr },
+  { "daggerdbl",                         500, nullptr },
+  { "nacute",                            500, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            722, nullptr },
+  { "Emacron",                           611, nullptr },
+  { "ellipsis",                          889, nullptr },
+  { "scaron",                            389, nullptr },
+  { "AE",                                889, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      556, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       214, nullptr },
+  { "eight",                             500, nullptr },
+  { "exclamdown",                        389, nullptr },
+  { "endash",                            500, nullptr },
+  { "oe",                                667, nullptr },
+  { "Abreve",                            611, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       444, nullptr },
+  { "Adieresis",                         611, nullptr },
+  { "copyright",                         760, nullptr },
+  { "Egrave",                            611, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         611, nullptr },
+  { "otilde",                            500, nullptr },
+  { "Idieresis",                         333, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               500, nullptr },
+  { "emacron",                           444, nullptr },
+  { "Odieresis",                         722, nullptr },
+  { "ucircumflex",                       500, nullptr },
+  { "bracketleft",                       389, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        333, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         556, nullptr },
+  { "umacron",                           500, nullptr },
+  { "abreve",                            500, nullptr },
+  { "Eacute",                            611, nullptr },
+  { "adieresis",                         500, nullptr },
+  { "egrave",                            444, nullptr },
+  { "edieresis",                         444, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                667, nullptr },
+  { "asterisk",                          500, nullptr },
+  { "odieresis",                         500, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            500, nullptr },
+  { "nine",                              500, nullptr },
+  { "five",                              500, nullptr },
+  { "udieresis",                         500, nullptr },
+  { "Zcaron",                            556, nullptr },
+  { "Scommaaccent",                      500, nullptr },
+  { "threequarters",                     750, nullptr },
+  { "guillemotright",                    500, nullptr },
+  { "Ccedilla",                          667, nullptr },
+  { "ydieresis",                         444, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                                920, nullptr },
+  { "eacute",                            444, nullptr },
+  { "underscore",                        500, nullptr },
+  { "Euro",                              500, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          675, nullptr },
+  { "zero",                              500, nullptr },
+  { "eth",                               500, nullptr },
+  { "Scedilla",                          500, nullptr },
+  { "Ograve",                            722, nullptr },
+  { "Racute",                            611, nullptr },
+  { "partialdiff",                       476, nullptr },
+  { "uacute",                            500, nullptr },
+  { "braceleft",                         400, nullptr },
+  { "Thorn",                             611, nullptr },
+  { "zcaron",                            389, nullptr },
+  { "scommaaccent",                      389, nullptr },
+  { "ccedilla",                          444, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            500, nullptr },
+  { "Ocircumflex",                       722, nullptr },
+  { "Oacute",                            722, nullptr },
+  { "scedilla",                          389, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            500, nullptr },
+  { "racute",                            389, nullptr },
+  { "Tcaron",                            556, nullptr },
+  { "Eogonek",                           611, nullptr },
+  { "thorn",                             500, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        760, nullptr },
+  { "radical",                           453, nullptr },
+  { "Aring",                             611, nullptr },
+  { "percent",                           833, nullptr },
+  { "six",                               500, nullptr },
+  { "paragraph",                         523, nullptr },
+  { "dcaron",                            544, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               500, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            333, nullptr },
+  { "Lacute",                            556, nullptr },
+  { "ocircumflex",                       500, nullptr },
+  { "oacute",                            500, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      556, nullptr },
+  { "tcaron",                            300, nullptr },
+  { "eogonek",                           444, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     722, nullptr },
+  { "asciicircum",                       422, nullptr },
+  { "aring",                             500, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           500, nullptr },
+  { "bracketright",                      389, nullptr },
+  { "Iacute",                            333, nullptr },
+  { "ampersand",                         778, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            667, nullptr },
+  { "plus",                              675, nullptr },
+  { "uring",                             500, nullptr },
+  { "quotesinglbase",                    333, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            556, nullptr },
+  { "ohungarumlaut",                     500, nullptr },
+  { "threesuperior",                     300, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           500, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      556, nullptr },
+  { "ncaron",                            500, nullptr },
+  { "florin",                            500, nullptr },
+  { "yacute",                            444, nullptr },
+  { "Rcommaaccent",                      611, nullptr },
+  { "fi",                                500, nullptr },
+  { "fl",                                500, nullptr },
+  { "Acircumflex",                       611, nullptr },
+  { "Cacute",                            667, nullptr },
+  { "Icircumflex",                       333, nullptr },
+  { "guillemotleft",                     500, nullptr },
+  { "germandbls",                        500, nullptr },
+  { "Amacron",                           611, nullptr },
+  { "seven",                             500, nullptr },
+  { "Sacute",                            500, nullptr },
+  { "ordmasculine",                      310, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          500, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           333, nullptr },
+  { "rcommaaccent",                      389, nullptr },
+  { "Zdotaccent",                        556, nullptr },
+  { "acircumflex",                       500, nullptr },
+  { "cacute",                            444, nullptr },
+  { "Ecaron",                            611, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        400, nullptr },
+  { "quotedblright",                     556, nullptr },
+  { "amacron",                           500, nullptr },
+  { "sacute",                            389, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              500, nullptr },
+  { "currency",                          500, nullptr },
+  { "logicalnot",                        675, nullptr },
+  { "zdotaccent",                        389, nullptr },
+  { "Atilde",                            611, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               275, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              675, nullptr },
+  { "ecaron",                            444, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            333, nullptr },
+  { "period",                            250, nullptr },
+  { "Rcaron",                            611, nullptr },
+  { "Kcommaaccent",                      667, nullptr },
+  { "greater",                           675, nullptr },
+  { "atilde",                            500, nullptr },
+  { "brokenbar",                         275, nullptr },
+  { "quoteleft",                         333, nullptr },
+  { "Edotaccent",                        611, nullptr },
+  { "onesuperior",                       300, nullptr }
 };
 
 static BuiltinFontWidth timesRomanWidthsTab[] = {
-  { "Ntilde",                            722, NULL },
-  { "rcaron",                            333, NULL },
-  { "kcommaaccent",                      500, NULL },
-  { "Ncommaaccent",                      722, NULL },
-  { "Zacute",                            611, NULL },
-  { "comma",                             250, NULL },
-  { "cedilla",                           333, NULL },
-  { "plusminus",                         564, NULL },
-  { "circumflex",                        333, NULL },
-  { "dotaccent",                         333, NULL },
-  { "edotaccent",                        444, NULL },
-  { "asciitilde",                        541, NULL },
-  { "colon",                             278, NULL },
-  { "onehalf",                           750, NULL },
-  { "dollar",                            500, NULL },
-  { "Lcaron",                            611, NULL },
-  { "ntilde",                            500, NULL },
-  { "Aogonek",                           722, NULL },
-  { "ncommaaccent",                      500, NULL },
-  { "minus",                             564, NULL },
-  { "Iogonek",                           333, NULL },
-  { "zacute",                            444, NULL },
-  { "yen",                               500, NULL },
-  { "space",                             250, NULL },
-  { "Omacron",                           722, NULL },
-  { "questiondown",                      444, NULL },
-  { "emdash",                           1000, NULL },
-  { "Agrave",                            722, NULL },
-  { "three",                             500, NULL },
-  { "numbersign",                        500, NULL },
-  { "lcaron",                            344, NULL },
-  { "A",                                 722, NULL },
-  { "B",                                 667, NULL },
-  { "C",                                 667, NULL },
-  { "aogonek",                           444, NULL },
-  { "D",                                 722, NULL },
-  { "E",                                 611, NULL },
-  { "onequarter",                        750, NULL },
-  { "F",                                 556, NULL },
-  { "G",                                 722, NULL },
-  { "H",                                 722, NULL },
-  { "I",                                 333, NULL },
-  { "J",                                 389, NULL },
-  { "K",                                 722, NULL },
-  { "iogonek",                           278, NULL },
-  { "backslash",                         278, NULL },
-  { "L",                                 611, NULL },
-  { "periodcentered",                    250, NULL },
-  { "M",                                 889, NULL },
-  { "N",                                 722, NULL },
-  { "omacron",                           500, NULL },
-  { "Tcommaaccent",                      611, NULL },
-  { "O",                                 722, NULL },
-  { "P",                                 556, NULL },
-  { "Q",                                 722, NULL },
-  { "Uhungarumlaut",                     722, NULL },
-  { "R",                                 667, NULL },
-  { "Aacute",                            722, NULL },
-  { "caron",                             333, NULL },
-  { "S",                                 556, NULL },
-  { "T",                                 611, NULL },
-  { "U",                                 722, NULL },
-  { "agrave",                            444, NULL },
-  { "V",                                 722, NULL },
-  { "W",                                 944, NULL },
-  { "X",                                 722, NULL },
-  { "question",                          444, NULL },
-  { "equal",                             564, NULL },
-  { "Y",                                 722, NULL },
-  { "Z",                                 611, NULL },
-  { "four",                              500, NULL },
-  { "a",                                 444, NULL },
-  { "Gcommaaccent",                      722, NULL },
-  { "b",                                 500, NULL },
-  { "c",                                 444, NULL },
-  { "d",                                 500, NULL },
-  { "e",                                 444, NULL },
-  { "f",                                 333, NULL },
-  { "g",                                 500, NULL },
-  { "bullet",                            350, NULL },
-  { "h",                                 500, NULL },
-  { "i",                                 278, NULL },
-  { "Oslash",                            722, NULL },
-  { "dagger",                            500, NULL },
-  { "j",                                 278, NULL },
-  { "k",                                 500, NULL },
-  { "l",                                 278, NULL },
-  { "m",                                 778, NULL },
-  { "n",                                 500, NULL },
-  { "tcommaaccent",                      278, NULL },
-  { "o",                                 500, NULL },
-  { "ordfeminine",                       276, NULL },
-  { "ring",                              333, NULL },
-  { "p",                                 500, NULL },
-  { "q",                                 500, NULL },
-  { "uhungarumlaut",                     500, NULL },
-  { "r",                                 333, NULL },
-  { "twosuperior",                       300, NULL },
-  { "aacute",                            444, NULL },
-  { "s",                                 389, NULL },
-  { "OE",                                889, NULL },
-  { "t",                                 278, NULL },
-  { "divide",                            564, NULL },
-  { "u",                                 500, NULL },
-  { "Ccaron",                            667, NULL },
-  { "v",                                 500, NULL },
-  { "w",                                 722, NULL },
-  { "x",                                 500, NULL },
-  { "y",                                 500, NULL },
-  { "z",                                 444, NULL },
-  { "Gbreve",                            722, NULL },
-  { "commaaccent",                       250, NULL },
-  { "hungarumlaut",                      333, NULL },
-  { "Idotaccent",                        333, NULL },
-  { "Nacute",                            722, NULL },
-  { "quotedbl",                          408, NULL },
-  { "gcommaaccent",                      500, NULL },
-  { "mu",                                500, NULL },
-  { "greaterequal",                      549, NULL },
-  { "Scaron",                            556, NULL },
-  { "Lslash",                            611, NULL },
-  { "semicolon",                         278, NULL },
-  { "oslash",                            500, NULL },
-  { "lessequal",                         549, NULL },
-  { "lozenge",                           471, NULL },
-  { "parenright",                        333, NULL },
-  { "ccaron",                            444, NULL },
-  { "Ecircumflex",                       611, NULL },
-  { "gbreve",                            500, NULL },
-  { "trademark",                         980, NULL },
-  { "daggerdbl",                         500, NULL },
-  { "nacute",                            500, NULL },
-  { "macron",                            333, NULL },
-  { "Otilde",                            722, NULL },
-  { "Emacron",                           611, NULL },
-  { "ellipsis",                         1000, NULL },
-  { "scaron",                            389, NULL },
-  { "AE",                                889, NULL },
-  { "Ucircumflex",                       722, NULL },
-  { "lslash",                            278, NULL },
-  { "quotedblleft",                      444, NULL },
-  { "guilsinglright",                    333, NULL },
-  { "hyphen",                            333, NULL },
-  { "quotesingle",                       180, NULL },
-  { "eight",                             500, NULL },
-  { "exclamdown",                        333, NULL },
-  { "endash",                            500, NULL },
-  { "oe",                                722, NULL },
-  { "Abreve",                            722, NULL },
-  { "Umacron",                           722, NULL },
-  { "ecircumflex",                       444, NULL },
-  { "Adieresis",                         722, NULL },
-  { "copyright",                         760, NULL },
-  { "Egrave",                            611, NULL },
-  { "slash",                             278, NULL },
-  { "Edieresis",                         611, NULL },
-  { "otilde",                            500, NULL },
-  { "Idieresis",                         333, NULL },
-  { "parenleft",                         333, NULL },
-  { "one",                               500, NULL },
-  { "emacron",                           444, NULL },
-  { "Odieresis",                         722, NULL },
-  { "ucircumflex",                       500, NULL },
-  { "bracketleft",                       333, NULL },
-  { "Ugrave",                            722, NULL },
-  { "quoteright",                        333, NULL },
-  { "Udieresis",                         722, NULL },
-  { "perthousand",                      1000, NULL },
-  { "Ydieresis",                         722, NULL },
-  { "umacron",                           500, NULL },
-  { "abreve",                            444, NULL },
-  { "Eacute",                            611, NULL },
-  { "adieresis",                         444, NULL },
-  { "egrave",                            444, NULL },
-  { "edieresis",                         444, NULL },
-  { "idieresis",                         278, NULL },
-  { "Eth",                               722, NULL },
-  { "ae",                                667, NULL },
-  { "asterisk",                          500, NULL },
-  { "odieresis",                         500, NULL },
-  { "Uacute",                            722, NULL },
-  { "ugrave",                            500, NULL },
-  { "nine",                              500, NULL },
-  { "five",                              500, NULL },
-  { "udieresis",                         500, NULL },
-  { "Zcaron",                            611, NULL },
-  { "Scommaaccent",                      556, NULL },
-  { "threequarters",                     750, NULL },
-  { "guillemotright",                    500, NULL },
-  { "Ccedilla",                          667, NULL },
-  { "ydieresis",                         500, NULL },
-  { "tilde",                             333, NULL },
-  { "at",                                921, NULL },
-  { "eacute",                            444, NULL },
-  { "underscore",                        500, NULL },
-  { "Euro",                              500, NULL },
-  { "Dcroat",                            722, NULL },
-  { "multiply",                          564, NULL },
-  { "zero",                              500, NULL },
-  { "eth",                               500, NULL },
-  { "Scedilla",                          556, NULL },
-  { "Ograve",                            722, NULL },
-  { "Racute",                            667, NULL },
-  { "partialdiff",                       476, NULL },
-  { "uacute",                            500, NULL },
-  { "braceleft",                         480, NULL },
-  { "Thorn",                             556, NULL },
-  { "zcaron",                            444, NULL },
-  { "scommaaccent",                      389, NULL },
-  { "ccedilla",                          444, NULL },
-  { "Dcaron",                            722, NULL },
-  { "dcroat",                            500, NULL },
-  { "Ocircumflex",                       722, NULL },
-  { "Oacute",                            722, NULL },
-  { "scedilla",                          389, NULL },
-  { "ogonek",                            333, NULL },
-  { "ograve",                            500, NULL },
-  { "racute",                            333, NULL },
-  { "Tcaron",                            611, NULL },
-  { "Eogonek",                           611, NULL },
-  { "thorn",                             500, NULL },
-  { "degree",                            400, NULL },
-  { "registered",                        760, NULL },
-  { "radical",                           453, NULL },
-  { "Aring",                             722, NULL },
-  { "percent",                           833, NULL },
-  { "six",                               500, NULL },
-  { "paragraph",                         453, NULL },
-  { "dcaron",                            588, NULL },
-  { "Uogonek",                           722, NULL },
-  { "two",                               500, NULL },
-  { "summation",                         600, NULL },
-  { "Igrave",                            333, NULL },
-  { "Lacute",                            611, NULL },
-  { "ocircumflex",                       500, NULL },
-  { "oacute",                            500, NULL },
-  { "Uring",                             722, NULL },
-  { "Lcommaaccent",                      611, NULL },
-  { "tcaron",                            326, NULL },
-  { "eogonek",                           444, NULL },
-  { "Delta",                             612, NULL },
-  { "Ohungarumlaut",                     722, NULL },
-  { "asciicircum",                       469, NULL },
-  { "aring",                             444, NULL },
-  { "grave",                             333, NULL },
-  { "uogonek",                           500, NULL },
-  { "bracketright",                      333, NULL },
-  { "Iacute",                            333, NULL },
-  { "ampersand",                         778, NULL },
-  { "igrave",                            278, NULL },
-  { "lacute",                            278, NULL },
-  { "Ncaron",                            722, NULL },
-  { "plus",                              564, NULL },
-  { "uring",                             500, NULL },
-  { "quotesinglbase",                    333, NULL },
-  { "lcommaaccent",                      278, NULL },
-  { "Yacute",                            722, NULL },
-  { "ohungarumlaut",                     500, NULL },
-  { "threesuperior",                     300, NULL },
-  { "acute",                             333, NULL },
-  { "section",                           500, NULL },
-  { "dieresis",                          333, NULL },
-  { "iacute",                            278, NULL },
-  { "quotedblbase",                      444, NULL },
-  { "ncaron",                            500, NULL },
-  { "florin",                            500, NULL },
-  { "yacute",                            500, NULL },
-  { "Rcommaaccent",                      667, NULL },
-  { "fi",                                556, NULL },
-  { "fl",                                556, NULL },
-  { "Acircumflex",                       722, NULL },
-  { "Cacute",                            667, NULL },
-  { "Icircumflex",                       333, NULL },
-  { "guillemotleft",                     500, NULL },
-  { "germandbls",                        500, NULL },
-  { "Amacron",                           722, NULL },
-  { "seven",                             500, NULL },
-  { "Sacute",                            556, NULL },
-  { "ordmasculine",                      310, NULL },
-  { "dotlessi",                          278, NULL },
-  { "sterling",                          500, NULL },
-  { "notequal",                          549, NULL },
-  { "Imacron",                           333, NULL },
-  { "rcommaaccent",                      333, NULL },
-  { "Zdotaccent",                        611, NULL },
-  { "acircumflex",                       444, NULL },
-  { "cacute",                            444, NULL },
-  { "Ecaron",                            611, NULL },
-  { "icircumflex",                       278, NULL },
-  { "braceright",                        480, NULL },
-  { "quotedblright",                     444, NULL },
-  { "amacron",                           444, NULL },
-  { "sacute",                            389, NULL },
-  { "imacron",                           278, NULL },
-  { "cent",                              500, NULL },
-  { "currency",                          500, NULL },
-  { "logicalnot",                        564, NULL },
-  { "zdotaccent",                        444, NULL },
-  { "Atilde",                            722, NULL },
-  { "breve",                             333, NULL },
-  { "bar",                               200, NULL },
-  { "fraction",                          167, NULL },
-  { "less",                              564, NULL },
-  { "ecaron",                            444, NULL },
-  { "guilsinglleft",                     333, NULL },
-  { "exclam",                            333, NULL },
-  { "period",                            250, NULL },
-  { "Rcaron",                            667, NULL },
-  { "Kcommaaccent",                      722, NULL },
-  { "greater",                           564, NULL },
-  { "atilde",                            444, NULL },
-  { "brokenbar",                         200, NULL },
-  { "quoteleft",                         333, NULL },
-  { "Edotaccent",                        611, NULL },
-  { "onesuperior",                       300, NULL }
+  { "Ntilde",                            722, nullptr },
+  { "rcaron",                            333, nullptr },
+  { "kcommaaccent",                      500, nullptr },
+  { "Ncommaaccent",                      722, nullptr },
+  { "Zacute",                            611, nullptr },
+  { "comma",                             250, nullptr },
+  { "cedilla",                           333, nullptr },
+  { "plusminus",                         564, nullptr },
+  { "circumflex",                        333, nullptr },
+  { "dotaccent",                         333, nullptr },
+  { "edotaccent",                        444, nullptr },
+  { "asciitilde",                        541, nullptr },
+  { "colon",                             278, nullptr },
+  { "onehalf",                           750, nullptr },
+  { "dollar",                            500, nullptr },
+  { "Lcaron",                            611, nullptr },
+  { "ntilde",                            500, nullptr },
+  { "Aogonek",                           722, nullptr },
+  { "ncommaaccent",                      500, nullptr },
+  { "minus",                             564, nullptr },
+  { "Iogonek",                           333, nullptr },
+  { "zacute",                            444, nullptr },
+  { "yen",                               500, nullptr },
+  { "space",                             250, nullptr },
+  { "Omacron",                           722, nullptr },
+  { "questiondown",                      444, nullptr },
+  { "emdash",                           1000, nullptr },
+  { "Agrave",                            722, nullptr },
+  { "three",                             500, nullptr },
+  { "numbersign",                        500, nullptr },
+  { "lcaron",                            344, nullptr },
+  { "A",                                 722, nullptr },
+  { "B",                                 667, nullptr },
+  { "C",                                 667, nullptr },
+  { "aogonek",                           444, nullptr },
+  { "D",                                 722, nullptr },
+  { "E",                                 611, nullptr },
+  { "onequarter",                        750, nullptr },
+  { "F",                                 556, nullptr },
+  { "G",                                 722, nullptr },
+  { "H",                                 722, nullptr },
+  { "I",                                 333, nullptr },
+  { "J",                                 389, nullptr },
+  { "K",                                 722, nullptr },
+  { "iogonek",                           278, nullptr },
+  { "backslash",                         278, nullptr },
+  { "L",                                 611, nullptr },
+  { "periodcentered",                    250, nullptr },
+  { "M",                                 889, nullptr },
+  { "N",                                 722, nullptr },
+  { "omacron",                           500, nullptr },
+  { "Tcommaaccent",                      611, nullptr },
+  { "O",                                 722, nullptr },
+  { "P",                                 556, nullptr },
+  { "Q",                                 722, nullptr },
+  { "Uhungarumlaut",                     722, nullptr },
+  { "R",                                 667, nullptr },
+  { "Aacute",                            722, nullptr },
+  { "caron",                             333, nullptr },
+  { "S",                                 556, nullptr },
+  { "T",                                 611, nullptr },
+  { "U",                                 722, nullptr },
+  { "agrave",                            444, nullptr },
+  { "V",                                 722, nullptr },
+  { "W",                                 944, nullptr },
+  { "X",                                 722, nullptr },
+  { "question",                          444, nullptr },
+  { "equal",                             564, nullptr },
+  { "Y",                                 722, nullptr },
+  { "Z",                                 611, nullptr },
+  { "four",                              500, nullptr },
+  { "a",                                 444, nullptr },
+  { "Gcommaaccent",                      722, nullptr },
+  { "b",                                 500, nullptr },
+  { "c",                                 444, nullptr },
+  { "d",                                 500, nullptr },
+  { "e",                                 444, nullptr },
+  { "f",                                 333, nullptr },
+  { "g",                                 500, nullptr },
+  { "bullet",                            350, nullptr },
+  { "h",                                 500, nullptr },
+  { "i",                                 278, nullptr },
+  { "Oslash",                            722, nullptr },
+  { "dagger",                            500, nullptr },
+  { "j",                                 278, nullptr },
+  { "k",                                 500, nullptr },
+  { "l",                                 278, nullptr },
+  { "m",                                 778, nullptr },
+  { "n",                                 500, nullptr },
+  { "tcommaaccent",                      278, nullptr },
+  { "o",                                 500, nullptr },
+  { "ordfeminine",                       276, nullptr },
+  { "ring",                              333, nullptr },
+  { "p",                                 500, nullptr },
+  { "q",                                 500, nullptr },
+  { "uhungarumlaut",                     500, nullptr },
+  { "r",                                 333, nullptr },
+  { "twosuperior",                       300, nullptr },
+  { "aacute",                            444, nullptr },
+  { "s",                                 389, nullptr },
+  { "OE",                                889, nullptr },
+  { "t",                                 278, nullptr },
+  { "divide",                            564, nullptr },
+  { "u",                                 500, nullptr },
+  { "Ccaron",                            667, nullptr },
+  { "v",                                 500, nullptr },
+  { "w",                                 722, nullptr },
+  { "x",                                 500, nullptr },
+  { "y",                                 500, nullptr },
+  { "z",                                 444, nullptr },
+  { "Gbreve",                            722, nullptr },
+  { "commaaccent",                       250, nullptr },
+  { "hungarumlaut",                      333, nullptr },
+  { "Idotaccent",                        333, nullptr },
+  { "Nacute",                            722, nullptr },
+  { "quotedbl",                          408, nullptr },
+  { "gcommaaccent",                      500, nullptr },
+  { "mu",                                500, nullptr },
+  { "greaterequal",                      549, nullptr },
+  { "Scaron",                            556, nullptr },
+  { "Lslash",                            611, nullptr },
+  { "semicolon",                         278, nullptr },
+  { "oslash",                            500, nullptr },
+  { "lessequal",                         549, nullptr },
+  { "lozenge",                           471, nullptr },
+  { "parenright",                        333, nullptr },
+  { "ccaron",                            444, nullptr },
+  { "Ecircumflex",                       611, nullptr },
+  { "gbreve",                            500, nullptr },
+  { "trademark",                         980, nullptr },
+  { "daggerdbl",                         500, nullptr },
+  { "nacute",                            500, nullptr },
+  { "macron",                            333, nullptr },
+  { "Otilde",                            722, nullptr },
+  { "Emacron",                           611, nullptr },
+  { "ellipsis",                         1000, nullptr },
+  { "scaron",                            389, nullptr },
+  { "AE",                                889, nullptr },
+  { "Ucircumflex",                       722, nullptr },
+  { "lslash",                            278, nullptr },
+  { "quotedblleft",                      444, nullptr },
+  { "guilsinglright",                    333, nullptr },
+  { "hyphen",                            333, nullptr },
+  { "quotesingle",                       180, nullptr },
+  { "eight",                             500, nullptr },
+  { "exclamdown",                        333, nullptr },
+  { "endash",                            500, nullptr },
+  { "oe",                                722, nullptr },
+  { "Abreve",                            722, nullptr },
+  { "Umacron",                           722, nullptr },
+  { "ecircumflex",                       444, nullptr },
+  { "Adieresis",                         722, nullptr },
+  { "copyright",                         760, nullptr },
+  { "Egrave",                            611, nullptr },
+  { "slash",                             278, nullptr },
+  { "Edieresis",                         611, nullptr },
+  { "otilde",                            500, nullptr },
+  { "Idieresis",                         333, nullptr },
+  { "parenleft",                         333, nullptr },
+  { "one",                               500, nullptr },
+  { "emacron",                           444, nullptr },
+  { "Odieresis",                         722, nullptr },
+  { "ucircumflex",                       500, nullptr },
+  { "bracketleft",                       333, nullptr },
+  { "Ugrave",                            722, nullptr },
+  { "quoteright",                        333, nullptr },
+  { "Udieresis",                         722, nullptr },
+  { "perthousand",                      1000, nullptr },
+  { "Ydieresis",                         722, nullptr },
+  { "umacron",                           500, nullptr },
+  { "abreve",                            444, nullptr },
+  { "Eacute",                            611, nullptr },
+  { "adieresis",                         444, nullptr },
+  { "egrave",                            444, nullptr },
+  { "edieresis",                         444, nullptr },
+  { "idieresis",                         278, nullptr },
+  { "Eth",                               722, nullptr },
+  { "ae",                                667, nullptr },
+  { "asterisk",                          500, nullptr },
+  { "odieresis",                         500, nullptr },
+  { "Uacute",                            722, nullptr },
+  { "ugrave",                            500, nullptr },
+  { "nine",                              500, nullptr },
+  { "five",                              500, nullptr },
+  { "udieresis",                         500, nullptr },
+  { "Zcaron",                            611, nullptr },
+  { "Scommaaccent",                      556, nullptr },
+  { "threequarters",                     750, nullptr },
+  { "guillemotright",                    500, nullptr },
+  { "Ccedilla",                          667, nullptr },
+  { "ydieresis",                         500, nullptr },
+  { "tilde",                             333, nullptr },
+  { "at",                                921, nullptr },
+  { "eacute",                            444, nullptr },
+  { "underscore",                        500, nullptr },
+  { "Euro",                              500, nullptr },
+  { "Dcroat",                            722, nullptr },
+  { "multiply",                          564, nullptr },
+  { "zero",                              500, nullptr },
+  { "eth",                               500, nullptr },
+  { "Scedilla",                          556, nullptr },
+  { "Ograve",                            722, nullptr },
+  { "Racute",                            667, nullptr },
+  { "partialdiff",                       476, nullptr },
+  { "uacute",                            500, nullptr },
+  { "braceleft",                         480, nullptr },
+  { "Thorn",                             556, nullptr },
+  { "zcaron",                            444, nullptr },
+  { "scommaaccent",                      389, nullptr },
+  { "ccedilla",                          444, nullptr },
+  { "Dcaron",                            722, nullptr },
+  { "dcroat",                            500, nullptr },
+  { "Ocircumflex",                       722, nullptr },
+  { "Oacute",                            722, nullptr },
+  { "scedilla",                          389, nullptr },
+  { "ogonek",                            333, nullptr },
+  { "ograve",                            500, nullptr },
+  { "racute",                            333, nullptr },
+  { "Tcaron",                            611, nullptr },
+  { "Eogonek",                           611, nullptr },
+  { "thorn",                             500, nullptr },
+  { "degree",                            400, nullptr },
+  { "registered",                        760, nullptr },
+  { "radical",                           453, nullptr },
+  { "Aring",                             722, nullptr },
+  { "percent",                           833, nullptr },
+  { "six",                               500, nullptr },
+  { "paragraph",                         453, nullptr },
+  { "dcaron",                            588, nullptr },
+  { "Uogonek",                           722, nullptr },
+  { "two",                               500, nullptr },
+  { "summation",                         600, nullptr },
+  { "Igrave",                            333, nullptr },
+  { "Lacute",                            611, nullptr },
+  { "ocircumflex",                       500, nullptr },
+  { "oacute",                            500, nullptr },
+  { "Uring",                             722, nullptr },
+  { "Lcommaaccent",                      611, nullptr },
+  { "tcaron",                            326, nullptr },
+  { "eogonek",                           444, nullptr },
+  { "Delta",                             612, nullptr },
+  { "Ohungarumlaut",                     722, nullptr },
+  { "asciicircum",                       469, nullptr },
+  { "aring",                             444, nullptr },
+  { "grave",                             333, nullptr },
+  { "uogonek",                           500, nullptr },
+  { "bracketright",                      333, nullptr },
+  { "Iacute",                            333, nullptr },
+  { "ampersand",                         778, nullptr },
+  { "igrave",                            278, nullptr },
+  { "lacute",                            278, nullptr },
+  { "Ncaron",                            722, nullptr },
+  { "plus",                              564, nullptr },
+  { "uring",                             500, nullptr },
+  { "quotesinglbase",                    333, nullptr },
+  { "lcommaaccent",                      278, nullptr },
+  { "Yacute",                            722, nullptr },
+  { "ohungarumlaut",                     500, nullptr },
+  { "threesuperior",                     300, nullptr },
+  { "acute",                             333, nullptr },
+  { "section",                           500, nullptr },
+  { "dieresis",                          333, nullptr },
+  { "iacute",                            278, nullptr },
+  { "quotedblbase",                      444, nullptr },
+  { "ncaron",                            500, nullptr },
+  { "florin",                            500, nullptr },
+  { "yacute",                            500, nullptr },
+  { "Rcommaaccent",                      667, nullptr },
+  { "fi",                                556, nullptr },
+  { "fl",                                556, nullptr },
+  { "Acircumflex",                       722, nullptr },
+  { "Cacute",                            667, nullptr },
+  { "Icircumflex",                       333, nullptr },
+  { "guillemotleft",                     500, nullptr },
+  { "germandbls",                        500, nullptr },
+  { "Amacron",                           722, nullptr },
+  { "seven",                             500, nullptr },
+  { "Sacute",                            556, nullptr },
+  { "ordmasculine",                      310, nullptr },
+  { "dotlessi",                          278, nullptr },
+  { "sterling",                          500, nullptr },
+  { "notequal",                          549, nullptr },
+  { "Imacron",                           333, nullptr },
+  { "rcommaaccent",                      333, nullptr },
+  { "Zdotaccent",                        611, nullptr },
+  { "acircumflex",                       444, nullptr },
+  { "cacute",                            444, nullptr },
+  { "Ecaron",                            611, nullptr },
+  { "icircumflex",                       278, nullptr },
+  { "braceright",                        480, nullptr },
+  { "quotedblright",                     444, nullptr },
+  { "amacron",                           444, nullptr },
+  { "sacute",                            389, nullptr },
+  { "imacron",                           278, nullptr },
+  { "cent",                              500, nullptr },
+  { "currency",                          500, nullptr },
+  { "logicalnot",                        564, nullptr },
+  { "zdotaccent",                        444, nullptr },
+  { "Atilde",                            722, nullptr },
+  { "breve",                             333, nullptr },
+  { "bar",                               200, nullptr },
+  { "fraction",                          167, nullptr },
+  { "less",                              564, nullptr },
+  { "ecaron",                            444, nullptr },
+  { "guilsinglleft",                     333, nullptr },
+  { "exclam",                            333, nullptr },
+  { "period",                            250, nullptr },
+  { "Rcaron",                            667, nullptr },
+  { "Kcommaaccent",                      722, nullptr },
+  { "greater",                           564, nullptr },
+  { "atilde",                            444, nullptr },
+  { "brokenbar",                         200, nullptr },
+  { "quoteleft",                         333, nullptr },
+  { "Edotaccent",                        611, nullptr },
+  { "onesuperior",                       300, nullptr }
 };
 
 static BuiltinFontWidth zapfDingbatsWidthsTab[] = {
-  { "a81",                               438, NULL },
-  { "a82",                               138, NULL },
-  { "a83",                               277, NULL },
-  { "a84",                               415, NULL },
-  { "a85",                               509, NULL },
-  { "a86",                               410, NULL },
-  { "a87",                               234, NULL },
-  { "a88",                               234, NULL },
-  { "a89",                               390, NULL },
-  { "a140",                              788, NULL },
-  { "a141",                              788, NULL },
-  { "a142",                              788, NULL },
-  { "a143",                              788, NULL },
-  { "a144",                              788, NULL },
-  { "a145",                              788, NULL },
-  { "a146",                              788, NULL },
-  { "a147",                              788, NULL },
-  { "a148",                              788, NULL },
-  { "a149",                              788, NULL },
-  { "a90",                               390, NULL },
-  { "a91",                               276, NULL },
-  { "a92",                               276, NULL },
-  { "space",                             278, NULL },
-  { "a93",                               317, NULL },
-  { "a94",                               317, NULL },
-  { "a95",                               334, NULL },
-  { "a96",                               334, NULL },
-  { "a97",                               392, NULL },
-  { "a98",                               392, NULL },
-  { "a99",                               668, NULL },
-  { "a150",                              788, NULL },
-  { "a151",                              788, NULL },
-  { "a152",                              788, NULL },
-  { "a153",                              788, NULL },
-  { "a154",                              788, NULL },
-  { "a155",                              788, NULL },
-  { "a156",                              788, NULL },
-  { "a157",                              788, NULL },
-  { "a158",                              788, NULL },
-  { "a159",                              788, NULL },
-  { "a160",                              894, NULL },
-  { "a161",                              838, NULL },
-  { "a162",                              924, NULL },
-  { "a163",                             1016, NULL },
-  { "a164",                              458, NULL },
-  { "a165",                              924, NULL },
-  { "a166",                              918, NULL },
-  { "a167",                              927, NULL },
-  { "a168",                              928, NULL },
-  { "a169",                              928, NULL },
-  { "a170",                              834, NULL },
-  { "a171",                              873, NULL },
-  { "a172",                              828, NULL },
-  { "a173",                              924, NULL },
-  { "a174",                              917, NULL },
-  { "a175",                              930, NULL },
-  { "a176",                              931, NULL },
-  { "a177",                              463, NULL },
-  { "a178",                              883, NULL },
-  { "a179",                              836, NULL },
-  { "a180",                              867, NULL },
-  { "a181",                              696, NULL },
-  { "a182",                              874, NULL },
-  { "a183",                              760, NULL },
-  { "a184",                              946, NULL },
-  { "a185",                              865, NULL },
-  { "a186",                              967, NULL },
-  { "a187",                              831, NULL },
-  { "a188",                              873, NULL },
-  { "a189",                              927, NULL },
-  { "a1",                                974, NULL },
-  { "a2",                                961, NULL },
-  { "a3",                                980, NULL },
-  { "a4",                                719, NULL },
-  { "a5",                                789, NULL },
-  { "a6",                                494, NULL },
-  { "a7",                                552, NULL },
-  { "a8",                                537, NULL },
-  { "a9",                                577, NULL },
-  { "a190",                              970, NULL },
-  { "a191",                              918, NULL },
-  { "a192",                              748, NULL },
-  { "a193",                              836, NULL },
-  { "a194",                              771, NULL },
-  { "a195",                              888, NULL },
-  { "a196",                              748, NULL },
-  { "a197",                              771, NULL },
-  { "a198",                              888, NULL },
-  { "a199",                              867, NULL },
-  { "a10",                               692, NULL },
-  { "a11",                               960, NULL },
-  { "a12",                               939, NULL },
-  { "a13",                               549, NULL },
-  { "a14",                               855, NULL },
-  { "a15",                               911, NULL },
-  { "a16",                               933, NULL },
-  { "a17",                               945, NULL },
-  { "a18",                               974, NULL },
-  { "a19",                               755, NULL },
-  { "a20",                               846, NULL },
-  { "a21",                               762, NULL },
-  { "a22",                               761, NULL },
-  { "a23",                               571, NULL },
-  { "a24",                               677, NULL },
-  { "a25",                               763, NULL },
-  { "a26",                               760, NULL },
-  { "a27",                               759, NULL },
-  { "a28",                               754, NULL },
-  { "a29",                               786, NULL },
-  { "a30",                               788, NULL },
-  { "a31",                               788, NULL },
-  { "a32",                               790, NULL },
-  { "a33",                               793, NULL },
-  { "a34",                               794, NULL },
-  { "a35",                               816, NULL },
-  { "a36",                               823, NULL },
-  { "a37",                               789, NULL },
-  { "a38",                               841, NULL },
-  { "a39",                               823, NULL },
-  { "a40",                               833, NULL },
-  { "a41",                               816, NULL },
-  { "a42",                               831, NULL },
-  { "a43",                               923, NULL },
-  { "a44",                               744, NULL },
-  { "a45",                               723, NULL },
-  { "a46",                               749, NULL },
-  { "a47",                               790, NULL },
-  { "a48",                               792, NULL },
-  { "a49",                               695, NULL },
-  { "a100",                              668, NULL },
-  { "a101",                              732, NULL },
-  { "a102",                              544, NULL },
-  { "a103",                              544, NULL },
-  { "a104",                              910, NULL },
-  { "a105",                              911, NULL },
-  { "a106",                              667, NULL },
-  { "a107",                              760, NULL },
-  { "a108",                              760, NULL },
-  { "a109",                              626, NULL },
-  { "a50",                               776, NULL },
-  { "a51",                               768, NULL },
-  { "a52",                               792, NULL },
-  { "a53",                               759, NULL },
-  { "a54",                               707, NULL },
-  { "a55",                               708, NULL },
-  { "a56",                               682, NULL },
-  { "a57",                               701, NULL },
-  { "a58",                               826, NULL },
-  { "a59",                               815, NULL },
-  { "a110",                              694, NULL },
-  { "a111",                              595, NULL },
-  { "a112",                              776, NULL },
-  { "a117",                              690, NULL },
-  { "a118",                              791, NULL },
-  { "a119",                              790, NULL },
-  { "a60",                               789, NULL },
-  { "a61",                               789, NULL },
-  { "a62",                               707, NULL },
-  { "a63",                               687, NULL },
-  { "a64",                               696, NULL },
-  { "a65",                               689, NULL },
-  { "a66",                               786, NULL },
-  { "a67",                               787, NULL },
-  { "a68",                               713, NULL },
-  { "a69",                               791, NULL },
-  { "a200",                              696, NULL },
-  { "a201",                              874, NULL },
-  { "a120",                              788, NULL },
-  { "a121",                              788, NULL },
-  { "a202",                              974, NULL },
-  { "a122",                              788, NULL },
-  { "a203",                              762, NULL },
-  { "a123",                              788, NULL },
-  { "a204",                              759, NULL },
-  { "a124",                              788, NULL },
-  { "a205",                              509, NULL },
-  { "a125",                              788, NULL },
-  { "a206",                              410, NULL },
-  { "a126",                              788, NULL },
-  { "a127",                              788, NULL },
-  { "a128",                              788, NULL },
-  { "a129",                              788, NULL },
-  { "a70",                               785, NULL },
-  { "a71",                               791, NULL },
-  { "a72",                               873, NULL },
-  { "a73",                               761, NULL },
-  { "a74",                               762, NULL },
-  { "a75",                               759, NULL },
-  { "a76",                               892, NULL },
-  { "a77",                               892, NULL },
-  { "a78",                               788, NULL },
-  { "a79",                               784, NULL },
-  { "a130",                              788, NULL },
-  { "a131",                              788, NULL },
-  { "a132",                              788, NULL },
-  { "a133",                              788, NULL },
-  { "a134",                              788, NULL },
-  { "a135",                              788, NULL },
-  { "a136",                              788, NULL },
-  { "a137",                              788, NULL },
-  { "a138",                              788, NULL },
-  { "a139",                              788, NULL }
+  { "a81",                               438, nullptr },
+  { "a82",                               138, nullptr },
+  { "a83",                               277, nullptr },
+  { "a84",                               415, nullptr },
+  { "a85",                               509, nullptr },
+  { "a86",                               410, nullptr },
+  { "a87",                               234, nullptr },
+  { "a88",                               234, nullptr },
+  { "a89",                               390, nullptr },
+  { "a140",                              788, nullptr },
+  { "a141",                              788, nullptr },
+  { "a142",                              788, nullptr },
+  { "a143",                              788, nullptr },
+  { "a144",                              788, nullptr },
+  { "a145",                              788, nullptr },
+  { "a146",                              788, nullptr },
+  { "a147",                              788, nullptr },
+  { "a148",                              788, nullptr },
+  { "a149",                              788, nullptr },
+  { "a90",                               390, nullptr },
+  { "a91",                               276, nullptr },
+  { "a92",                               276, nullptr },
+  { "space",                             278, nullptr },
+  { "a93",                               317, nullptr },
+  { "a94",                               317, nullptr },
+  { "a95",                               334, nullptr },
+  { "a96",                               334, nullptr },
+  { "a97",                               392, nullptr },
+  { "a98",                               392, nullptr },
+  { "a99",                               668, nullptr },
+  { "a150",                              788, nullptr },
+  { "a151",                              788, nullptr },
+  { "a152",                              788, nullptr },
+  { "a153",                              788, nullptr },
+  { "a154",                              788, nullptr },
+  { "a155",                              788, nullptr },
+  { "a156",                              788, nullptr },
+  { "a157",                              788, nullptr },
+  { "a158",                              788, nullptr },
+  { "a159",                              788, nullptr },
+  { "a160",                              894, nullptr },
+  { "a161",                              838, nullptr },
+  { "a162",                              924, nullptr },
+  { "a163",                             1016, nullptr },
+  { "a164",                              458, nullptr },
+  { "a165",                              924, nullptr },
+  { "a166",                              918, nullptr },
+  { "a167",                              927, nullptr },
+  { "a168",                              928, nullptr },
+  { "a169",                              928, nullptr },
+  { "a170",                              834, nullptr },
+  { "a171",                              873, nullptr },
+  { "a172",                              828, nullptr },
+  { "a173",                              924, nullptr },
+  { "a174",                              917, nullptr },
+  { "a175",                              930, nullptr },
+  { "a176",                              931, nullptr },
+  { "a177",                              463, nullptr },
+  { "a178",                              883, nullptr },
+  { "a179",                              836, nullptr },
+  { "a180",                              867, nullptr },
+  { "a181",                              696, nullptr },
+  { "a182",                              874, nullptr },
+  { "a183",                              760, nullptr },
+  { "a184",                              946, nullptr },
+  { "a185",                              865, nullptr },
+  { "a186",                              967, nullptr },
+  { "a187",                              831, nullptr },
+  { "a188",                              873, nullptr },
+  { "a189",                              927, nullptr },
+  { "a1",                                974, nullptr },
+  { "a2",                                961, nullptr },
+  { "a3",                                980, nullptr },
+  { "a4",                                719, nullptr },
+  { "a5",                                789, nullptr },
+  { "a6",                                494, nullptr },
+  { "a7",                                552, nullptr },
+  { "a8",                                537, nullptr },
+  { "a9",                                577, nullptr },
+  { "a190",                              970, nullptr },
+  { "a191",                              918, nullptr },
+  { "a192",                              748, nullptr },
+  { "a193",                              836, nullptr },
+  { "a194",                              771, nullptr },
+  { "a195",                              888, nullptr },
+  { "a196",                              748, nullptr },
+  { "a197",                              771, nullptr },
+  { "a198",                              888, nullptr },
+  { "a199",                              867, nullptr },
+  { "a10",                               692, nullptr },
+  { "a11",                               960, nullptr },
+  { "a12",                               939, nullptr },
+  { "a13",                               549, nullptr },
+  { "a14",                               855, nullptr },
+  { "a15",                               911, nullptr },
+  { "a16",                               933, nullptr },
+  { "a17",                               945, nullptr },
+  { "a18",                               974, nullptr },
+  { "a19",                               755, nullptr },
+  { "a20",                               846, nullptr },
+  { "a21",                               762, nullptr },
+  { "a22",                               761, nullptr },
+  { "a23",                               571, nullptr },
+  { "a24",                               677, nullptr },
+  { "a25",                               763, nullptr },
+  { "a26",                               760, nullptr },
+  { "a27",                               759, nullptr },
+  { "a28",                               754, nullptr },
+  { "a29",                               786, nullptr },
+  { "a30",                               788, nullptr },
+  { "a31",                               788, nullptr },
+  { "a32",                               790, nullptr },
+  { "a33",                               793, nullptr },
+  { "a34",                               794, nullptr },
+  { "a35",                               816, nullptr },
+  { "a36",                               823, nullptr },
+  { "a37",                               789, nullptr },
+  { "a38",                               841, nullptr },
+  { "a39",                               823, nullptr },
+  { "a40",                               833, nullptr },
+  { "a41",                               816, nullptr },
+  { "a42",                               831, nullptr },
+  { "a43",                               923, nullptr },
+  { "a44",                               744, nullptr },
+  { "a45",                               723, nullptr },
+  { "a46",                               749, nullptr },
+  { "a47",                               790, nullptr },
+  { "a48",                               792, nullptr },
+  { "a49",                               695, nullptr },
+  { "a100",                              668, nullptr },
+  { "a101",                              732, nullptr },
+  { "a102",                              544, nullptr },
+  { "a103",                              544, nullptr },
+  { "a104",                              910, nullptr },
+  { "a105",                              911, nullptr },
+  { "a106",                              667, nullptr },
+  { "a107",                              760, nullptr },
+  { "a108",                              760, nullptr },
+  { "a109",                              626, nullptr },
+  { "a50",                               776, nullptr },
+  { "a51",                               768, nullptr },
+  { "a52",                               792, nullptr },
+  { "a53",                               759, nullptr },
+  { "a54",                               707, nullptr },
+  { "a55",                               708, nullptr },
+  { "a56",                               682, nullptr },
+  { "a57",                               701, nullptr },
+  { "a58",                               826, nullptr },
+  { "a59",                               815, nullptr },
+  { "a110",                              694, nullptr },
+  { "a111",                              595, nullptr },
+  { "a112",                              776, nullptr },
+  { "a117",                              690, nullptr },
+  { "a118",                              791, nullptr },
+  { "a119",                              790, nullptr },
+  { "a60",                               789, nullptr },
+  { "a61",                               789, nullptr },
+  { "a62",                               707, nullptr },
+  { "a63",                               687, nullptr },
+  { "a64",                               696, nullptr },
+  { "a65",                               689, nullptr },
+  { "a66",                               786, nullptr },
+  { "a67",                               787, nullptr },
+  { "a68",                               713, nullptr },
+  { "a69",                               791, nullptr },
+  { "a200",                              696, nullptr },
+  { "a201",                              874, nullptr },
+  { "a120",                              788, nullptr },
+  { "a121",                              788, nullptr },
+  { "a202",                              974, nullptr },
+  { "a122",                              788, nullptr },
+  { "a203",                              762, nullptr },
+  { "a123",                              788, nullptr },
+  { "a204",                              759, nullptr },
+  { "a124",                              788, nullptr },
+  { "a205",                              509, nullptr },
+  { "a125",                              788, nullptr },
+  { "a206",                              410, nullptr },
+  { "a126",                              788, nullptr },
+  { "a127",                              788, nullptr },
+  { "a128",                              788, nullptr },
+  { "a129",                              788, nullptr },
+  { "a70",                               785, nullptr },
+  { "a71",                               791, nullptr },
+  { "a72",                               873, nullptr },
+  { "a73",                               761, nullptr },
+  { "a74",                               762, nullptr },
+  { "a75",                               759, nullptr },
+  { "a76",                               892, nullptr },
+  { "a77",                               892, nullptr },
+  { "a78",                               788, nullptr },
+  { "a79",                               784, nullptr },
+  { "a130",                              788, nullptr },
+  { "a131",                              788, nullptr },
+  { "a132",                              788, nullptr },
+  { "a133",                              788, nullptr },
+  { "a134",                              788, nullptr },
+  { "a135",                              788, nullptr },
+  { "a136",                              788, nullptr },
+  { "a137",                              788, nullptr },
+  { "a138",                              788, nullptr },
+  { "a139",                              788, nullptr }
 };
 
 BuiltinFont builtinFonts[] = {
-  { "Courier",               standardEncoding,            629, -157, { -23, -250,  715,  805}, NULL },
-  { "Courier-Bold",          standardEncoding,            629, -157, {-113, -250,  749,  801}, NULL },
-  { "Courier-BoldOblique",   standardEncoding,            629, -157, { -57, -250,  869,  801}, NULL },
-  { "Courier-Oblique",       standardEncoding,            629, -157, { -27, -250,  849,  805}, NULL },
-  { "Helvetica",             standardEncoding,            718, -207, {-166, -225, 1000,  931}, NULL },
-  { "Helvetica-Bold",        standardEncoding,            718, -207, {-170, -228, 1003,  962}, NULL },
-  { "Helvetica-BoldOblique", standardEncoding,            718, -207, {-174, -228, 1114,  962}, NULL },
-  { "Helvetica-Oblique",     standardEncoding,            718, -207, {-170, -225, 1116,  931}, NULL },
-  { "Symbol",                symbolEncoding,             1010, -293, {-180, -293, 1090, 1010}, NULL },
-  { "Times-Bold",            standardEncoding,            683, -217, {-168, -218, 1000,  935}, NULL },
-  { "Times-BoldItalic",      standardEncoding,            683, -217, {-200, -218,  996,  921}, NULL },
-  { "Times-Italic",          standardEncoding,            683, -217, {-169, -217, 1010,  883}, NULL },
-  { "Times-Roman",           standardEncoding,            683, -217, {-168, -218, 1000,  898}, NULL },
-  { "ZapfDingbats",          zapfDingbatsEncoding,        820, -143, {  -1, -143,  981,  820}, NULL }
+  { "Courier",               standardEncoding,            629, -157, { -23, -250,  715,  805}, nullptr },
+  { "Courier-Bold",          standardEncoding,            629, -157, {-113, -250,  749,  801}, nullptr },
+  { "Courier-BoldOblique",   standardEncoding,            629, -157, { -57, -250,  869,  801}, nullptr },
+  { "Courier-Oblique",       standardEncoding,            629, -157, { -27, -250,  849,  805}, nullptr },
+  { "Helvetica",             standardEncoding,            718, -207, {-166, -225, 1000,  931}, nullptr },
+  { "Helvetica-Bold",        standardEncoding,            718, -207, {-170, -228, 1003,  962}, nullptr },
+  { "Helvetica-BoldOblique", standardEncoding,            718, -207, {-174, -228, 1114,  962}, nullptr },
+  { "Helvetica-Oblique",     standardEncoding,            718, -207, {-170, -225, 1116,  931}, nullptr },
+  { "Symbol",                symbolEncoding,             1010, -293, {-180, -293, 1090, 1010}, nullptr },
+  { "Times-Bold",            standardEncoding,            683, -217, {-168, -218, 1000,  935}, nullptr },
+  { "Times-BoldItalic",      standardEncoding,            683, -217, {-200, -218,  996,  921}, nullptr },
+  { "Times-Italic",          standardEncoding,            683, -217, {-169, -217, 1010,  883}, nullptr },
+  { "Times-Roman",           standardEncoding,            683, -217, {-168, -218, 1000,  898}, nullptr },
+  { "ZapfDingbats",          zapfDingbatsEncoding,        820, -143, {  -1, -143,  981,  820}, nullptr }
 };
 
 BuiltinFont *builtinFontSubst[] = {
diff --git a/poppler/CMap.cc b/poppler/CMap.cc
index 2d2a7d75..45b4502e 100644
--- a/poppler/CMap.cc
+++ b/poppler/CMap.cc
@@ -77,12 +77,12 @@ CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Object *obj) {
     }
     delete cMapNameA;
   } else if (obj->isStream()) {
-    if (!(cMap = CMap::parse(NULL, collectionA, obj->getStream()))) {
+    if (!(cMap = CMap::parse(nullptr, collectionA, obj->getStream()))) {
       error(errSyntaxError, -1, "Invalid CMap in Type 0 font");
     }
   } else {
     error(errSyntaxError, -1, "Invalid Encoding in Type 0 font");
-    return NULL;
+    return nullptr;
   }
   return cMap;
 }
@@ -105,7 +105,7 @@ CMap *CMap::parse(CMapCache *cache, GooString *collectionA,
     error(errSyntaxError, -1,
 	  "Couldn't find '{0:t}' CMap file for '{1:t}' collection",
 	  cMapNameA, collectionA);
-    return NULL;
+    return nullptr;
   }
 
   cMap = new CMap(collectionA->copy(), cMapNameA->copy());
@@ -117,7 +117,7 @@ CMap *CMap::parse(CMapCache *cache, GooString *collectionA,
 }
 
 CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Stream *str) {
-  CMap *cMap = new CMap(collectionA->copy(), NULL);
+  CMap *cMap = new CMap(collectionA->copy(), nullptr);
   Object obj1 = str->getDict()->lookup("UseCMap");
   if (!obj1.isNull()) {
     cMap->useCMap(cache, &obj1);
@@ -131,7 +131,7 @@ CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Stream *str) {
 
 CMap *CMap::parse(CMapCache *cache, GooString *collectionA,
 		  GooString *cMapNameA, Stream *stream) {
-  FILE *f = NULL;
+  FILE *f = nullptr;
   CMap *cmap;
   PSTokenizer *pst;
   char tok1[256], tok2[256], tok3[256];
@@ -154,7 +154,7 @@ CMap *CMap::parse(CMapCache *cache, GooString *collectionA,
 
       error(errSyntaxError, -1, "Couldn't find '{0:t}' CMap file for '{1:t}' collection",
 	    cMapNameA, collectionA);
-      return NULL;
+      return nullptr;
     }
     pst = new PSTokenizer(&getCharFromFile, f);
   }
@@ -323,7 +323,7 @@ CMap::CMap(GooString *collectionA, GooString *cMapNameA, int wModeA) {
   cMapName = cMapNameA;
   isIdent = gTrue;
   wMode = wModeA;
-  vector = NULL;
+  vector = nullptr;
   refCnt = 1;
 #ifdef MULTITHREADED
   gInitMutex(&mutex);
@@ -340,7 +340,7 @@ void CMap::useCMap(CMapCache *cache, char *useName) {
   // GlobalParams::getCMap() in order to acqure the lock need to use
   // GlobalParams::getCMap
   if (cache) {
-    subCMap = cache->getCMap(collection, useNameStr, NULL);
+    subCMap = cache->getCMap(collection, useNameStr, nullptr);
   } else {
     subCMap = globalParams->getCMap(collection, useNameStr);
   }
@@ -511,7 +511,7 @@ void CMap::setReverseMapVector(Guint startCode, CMapVectorEntry *vec,
  Guint *rmap, Guint rmapSize, Guint ncand) {
   int i;
 
-  if (vec == 0) return;
+  if (vec == nullptr) return;
   for (i = 0;i < 256;i++) {
     if (vec[i].isVector) {
       setReverseMapVector((startCode+i) << 8,
@@ -547,7 +547,7 @@ CMapCache::CMapCache() {
   int i;
 
   for (i = 0; i < cMapCacheSize; ++i) {
-    cache[i] = NULL;
+    cache[i] = nullptr;
   }
 }
 
@@ -591,5 +591,5 @@ CMap *CMapCache::getCMap(GooString *collection, GooString *cMapName, Stream *str
     cmap->incRefCnt();
     return cmap;
   }
-  return NULL;
+  return nullptr;
 }
diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index a375e0af..69b88dc8 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -181,7 +181,7 @@ _ft_new_face_uncached (FT_Library lib,
   FT_Face face;
   cairo_font_face_t *font_face;
 
-  if (font_data == NULL) {
+  if (font_data == nullptr) {
     if (FT_New_Face (lib, filename, 0, &face))
       return gFalse;
   } else {
@@ -287,7 +287,7 @@ _ft_new_face (FT_Library lib,
 
   tmpl.fd = -1;
 
-  if (font_data == NULL) {
+  if (font_data == nullptr) {
     /* if we fail to mmap the file, just pass it to FreeType instead */
     tmpl.fd = open (filename, O_RDONLY);
     if (tmpl.fd == -1)
@@ -298,7 +298,7 @@ _ft_new_face (FT_Library lib,
       return _ft_new_face_uncached (lib, filename, font_data, font_data_len, face_out, font_face_out);
     }
 
-    tmpl.bytes = (unsigned char *) mmap (NULL, st.st_size,
+    tmpl.bytes = (unsigned char *) mmap (nullptr, st.st_size,
 					 PROT_READ, MAP_PRIVATE,
 					 tmpl.fd, 0);
     if (tmpl.bytes == MAP_FAILED) {
@@ -352,7 +352,7 @@ _ft_new_face (FT_Library lib,
 
   l = (struct _ft_face_data *) gmallocn (1, sizeof (struct _ft_face_data));
   *l = tmpl;
-  l->prev = NULL;
+  l->prev = nullptr;
   l->next = _ft_open_faces;
   if (_ft_open_faces)
     _ft_open_faces->prev = l;
@@ -413,19 +413,19 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
   int *codeToGID;
   Guint codeToGIDLen;
   
-  codeToGID = NULL;
+  codeToGID = nullptr;
   codeToGIDLen = 0;
-  font_data = NULL;
+  font_data = nullptr;
   font_data_len = 0;
-  fileName = NULL;
-  fileNameC = NULL;
+  fileName = nullptr;
+  fileNameC = nullptr;
 
   GBool substitute = gFalse;
   
   ref = *gfxFont->getID();
   fontType = gfxFont->getType();
 
-  if (!(fontLoc = gfxFont->locateFont(xref, NULL))) {
+  if (!(fontLoc = gfxFont->locateFont(xref, nullptr))) {
     error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
     	gfxFont->getName() ? gfxFont->getName()->getCString()
 	                       : "(unnamed)");
@@ -435,7 +435,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
   // embedded font
   if (fontLoc->locType == gfxFontLocEmbedded) {
     font_data = gfxFont->readEmbFontFile(xref, &font_data_len);
-    if (NULL == font_data)
+    if (nullptr == font_data)
       goto err2;
 
   // external font
@@ -445,7 +445,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
     substitute = gTrue;
   }
 
-  if (fileName != NULL) {
+  if (fileName != nullptr) {
     fileNameC = fileName->getCString();
   }
 
@@ -482,7 +482,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
     break;
   case fontCIDType2:
   case fontCIDType2OT:
-    codeToGID = NULL;
+    codeToGID = nullptr;
     n = 0;
     if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
       n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
@@ -492,7 +492,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
 		n * sizeof(int));
       }
     } else {
-      if (font_data != NULL) {
+      if (font_data != nullptr) {
         ff = FoFiTrueType::make(font_data, font_data_len);
       } else {
         ff = FoFiTrueType::load(fileNameC);
@@ -506,7 +506,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
     /* Fall through */
   case fontTrueType:
   case fontTrueTypeOT:
-    if (font_data != NULL) {
+    if (font_data != nullptr) {
       ff = FoFiTrueType::make(font_data, font_data_len);
     } else {
       ff = FoFiTrueType::load(fileNameC);
@@ -530,12 +530,12 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
   case fontCIDType0:
   case fontCIDType0C:
 
-    codeToGID = NULL;
+    codeToGID = nullptr;
     codeToGIDLen = 0;
 
     if (!useCIDs)
     {
-      if (font_data != NULL) {
+      if (font_data != nullptr) {
         ff1c = FoFiType1C::make(font_data, font_data_len);
       } else {
         ff1c = FoFiType1C::load(fileNameC);
@@ -553,7 +553,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
     break;
 
   case fontCIDType0COT:
-    codeToGID = NULL;
+    codeToGID = nullptr;
     n = 0;
     if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
       n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
@@ -567,7 +567,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
 
     if (!codeToGID) {
       if (!useCIDs) {
-	if (font_data != NULL) {
+	if (font_data != nullptr) {
 	  ff = FoFiTrueType::make(font_data, font_data_len);
 	} else {
 	  ff = FoFiTrueType::load(fileNameC);
@@ -604,7 +604,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
   gfree (codeToGID);
   gfree (font_data);
   fprintf (stderr, "some font thing failed\n");
-  return NULL;
+  return nullptr;
 }
 
 //------------------------------------------------------------------------
@@ -704,7 +704,7 @@ _render_type3_glyph (cairo_scaled_font_t  *scaled_font,
   box.y1 = mat[1];
   box.x2 = mat[2];
   box.y2 = mat[3];
-  gfx = new Gfx(info->doc, output_dev, resDict, &box, NULL);
+  gfx = new Gfx(info->doc, output_dev, resDict, &box, nullptr);
   output_dev->startDoc(info->doc, info->fontEngine);
   output_dev->startPage (1, gfx->getState(), gfx->getXRef());
   output_dev->setInType3Char(gTrue);
@@ -809,7 +809,7 @@ CairoFontEngine::CairoFontEngine(FT_Library libA) {
 
   lib = libA;
   for (i = 0; i < cairoFontCacheSize; ++i) {
-    fontCache[i] = NULL;
+    fontCache[i] = nullptr;
   }
   
   FT_Int major, minor, patch;
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 09839505..330f7b06 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -96,7 +96,7 @@ static inline void printMatrix(cairo_matrix_t *matrix){
 //------------------------------------------------------------------------
 
 CairoImage::CairoImage (double x1, double y1, double x2, double y2) {
-  this->image = NULL;
+  this->image = nullptr;
   this->x1 = x1;
   this->y1 = y1;
   this->x2 = x2;
@@ -128,26 +128,26 @@ FT_Library CairoOutputDev::ft_lib;
 GBool CairoOutputDev::ft_lib_initialized = gFalse;
 
 CairoOutputDev::CairoOutputDev() {
-  doc = NULL;
+  doc = nullptr;
 
   if (!ft_lib_initialized) {
     FT_Init_FreeType(&ft_lib);
     ft_lib_initialized = gTrue;
   }
 
-  fontEngine = NULL;
+  fontEngine = nullptr;
   fontEngine_owner = gFalse;
-  glyphs = NULL;
-  fill_pattern = NULL;
+  glyphs = nullptr;
+  fill_pattern = nullptr;
   fill_color.r = fill_color.g = fill_color.b = 0;
-  stroke_pattern = NULL;
+  stroke_pattern = nullptr;
   stroke_color.r = stroke_color.g = stroke_color.b = 0;
   stroke_opacity = 1.0;
   fill_opacity = 1.0;
-  textClipPath = NULL;
-  strokePathClip = NULL;
-  cairo = NULL;
-  currentFont = NULL;
+  textClipPath = nullptr;
+  strokePathClip = nullptr;
+  cairo = nullptr;
+  currentFont = nullptr;
 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
   prescaleImages = gFalse;
 #else
@@ -161,23 +161,23 @@ CairoOutputDev::CairoOutputDev() {
   text_matrix_valid = gTrue;
   antialias = CAIRO_ANTIALIAS_DEFAULT;
 
-  groupColorSpaceStack = NULL;
-  maskStack = NULL;
-  group = NULL;
-  mask = NULL;
-  shape = NULL;
-  cairo_shape = NULL;
+  groupColorSpaceStack = nullptr;
+  maskStack = nullptr;
+  group = nullptr;
+  mask = nullptr;
+  shape = nullptr;
+  cairo_shape = nullptr;
   knockoutCount = 0;
 
-  text = NULL;
-  actualText = NULL;
+  text = nullptr;
+  actualText = nullptr;
 
   // the SA parameter supposedly defaults to false, but Acrobat
   // apparently hardwires it to true
   stroke_adjust = gTrue;
   align_stroke_coords = gFalse;
   adjusted_stroke_width = gFalse;
-  xref = NULL;
+  xref = nullptr;
 }
 
 CairoOutputDev::~CairoOutputDev() {
@@ -203,7 +203,7 @@ CairoOutputDev::~CairoOutputDev() {
 
 void CairoOutputDev::setCairo(cairo_t *cairo)
 {
-  if (this->cairo != NULL) {
+  if (this->cairo != nullptr) {
     cairo_status_t status = cairo_status (this->cairo);
     if (status) {
       error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status));
@@ -211,15 +211,15 @@ void CairoOutputDev::setCairo(cairo_t *cairo)
     cairo_destroy (this->cairo);
     assert(!cairo_shape);
   }
-  if (cairo != NULL) {
+  if (cairo != nullptr) {
     this->cairo = cairo_reference (cairo);
 	/* save the initial matrix so that we can use it for type3 fonts. */
 	//XXX: is this sufficient? could we miss changes to the matrix somehow?
 	cairo_get_matrix(cairo, &orig_matrix);
 	setContextAntialias(cairo, antialias);
   } else {
-    this->cairo = NULL;
-    this->cairo_shape = NULL;
+    this->cairo = nullptr;
+    this->cairo_shape = nullptr;
   }
 }
 
@@ -234,8 +234,8 @@ void CairoOutputDev::setTextPage(TextPage *text)
     this->text->incRefCnt();
     actualText = new ActualText(text);
   } else {
-    this->text = NULL;
-    actualText = NULL;
+    this->text = nullptr;
+    actualText = nullptr;
   }
 }
 
@@ -286,7 +286,7 @@ void CairoOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) {
 
   if (text)
     text->startPage(state);
-  if (xrefA != NULL) {
+  if (xrefA != nullptr) {
     xref = xrefA;
   }
 }
@@ -345,7 +345,7 @@ void CairoOutputDev::restoreState(GfxState *state) {
     if (strokePathClip->dashes)
       gfree (strokePathClip->dashes);
     gfree (strokePathClip);
-    strokePathClip = NULL;
+    strokePathClip = nullptr;
   }
 }
 
@@ -955,11 +955,11 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
   cairo_translate (cairo, -box.x1, -box.y1);
 
   strokePathTmp = strokePathClip;
-  strokePathClip = NULL;
+  strokePathClip = nullptr;
   adjusted_stroke_width_tmp = adjusted_stroke_width;
   maskTmp = mask;
-  mask = NULL;
-  gfx = new Gfx(doc, this, resDict, &box, NULL, NULL, NULL, gfxA->getXRef());
+  mask = nullptr;
+  gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA->getXRef());
   if (paintType == 2)
     inUncoloredPattern = gTrue;
   gfx->display(str);
@@ -1356,7 +1356,7 @@ void CairoOutputDev::clipToStrokePath(GfxState *state) {
     strokePathClip->dashes = (double*) gmallocn (sizeof(double), strokePathClip->dash_count);
     cairo_get_dash (cairo, strokePathClip->dashes, &strokePathClip->dash_offset);
   } else {
-    strokePathClip->dashes = NULL;
+    strokePathClip->dashes = nullptr;
   }
   strokePathClip->cap = cairo_get_line_cap (cairo);
   strokePathClip->join = cairo_get_line_join (cairo);
@@ -1508,12 +1508,12 @@ void CairoOutputDev::endString(GfxState *state)
 
 finish:
   gfree (glyphs);
-  glyphs = NULL;
+  glyphs = nullptr;
   if (use_show_text_glyphs) {
     gfree (clusters);
-    clusters = NULL;
+    clusters = nullptr;
     gfree (utf8);
-    utf8 = NULL;
+    utf8 = nullptr;
   }
 }
 
@@ -1584,7 +1584,7 @@ void CairoOutputDev::endTextObject(GfxState *state) {
       cairo_clip (cairo_shape);
     }
     cairo_path_destroy (textClipPath);
-    textClipPath = NULL;
+    textClipPath = nullptr;
   }
 }
 
@@ -1616,7 +1616,7 @@ static
 cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content)
 {
   cairo_pattern_t *pattern;
-  cairo_surface_t *surface = NULL;
+  cairo_surface_t *surface = nullptr;
 
   cairo_push_group_with_content (cairo, content);
   pattern = cairo_pop_group (cairo);
@@ -1728,7 +1728,7 @@ void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbo
       cairo_paint_with_alpha (cairo, fill_opacity);
     }
     cairo_pattern_destroy(mask);
-    mask = NULL;
+    mask = nullptr;
   }
 
   if (shape) {
@@ -1738,7 +1738,7 @@ void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbo
       cairo_set_source_rgb (cairo_shape, 0, 0, 0);
     }
     cairo_pattern_destroy (shape);
-    shape = NULL;
+    shape = nullptr;
   }
 
   popTransparencyGroup();
@@ -1886,7 +1886,7 @@ void CairoOutputDev::popTransparencyGroup() {
       /* we don't need to track the shape anymore because
        * we are not above any knockout groups */
       cairo_destroy(cairo_shape);
-      cairo_shape = NULL;
+      cairo_shape = nullptr;
     }
   }
   groupColorSpaceStack = css->next;
@@ -1897,7 +1897,7 @@ void CairoOutputDev::popTransparencyGroup() {
 void CairoOutputDev::clearSoftMask(GfxState * /*state*/) {
   if (mask)
     cairo_pattern_destroy(mask);
-  mask = NULL;
+  mask = nullptr;
 }
 
 /* Taken from cairo/doc/tutorial/src/singular.c */
@@ -2920,7 +2920,7 @@ GBool CairoOutputDev::setMimeDataForJBIG2Globals(Stream  *str,
   if (!globalsStr->isStream())
     return gTrue;
 
-  if (setMimeIdFromRef(image, CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, NULL,
+  if (setMimeIdFromRef(image, CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, nullptr,
                        jb2Str->getGlobalsStreamRef()))
     return gFalse;
 
@@ -3005,7 +3005,7 @@ void CairoOutputDev::setMimeData(GfxState *state, Stream *str, Object *ref,
   }
 
   obj = str->getDict()->lookup("ColorSpace");
-  colorSpace = GfxColorSpace::parse(NULL, &obj, this, state);
+  colorSpace = GfxColorSpace::parse(nullptr, &obj, this, state);
 
   // colorspace in stream dict may be different from colorspace in jpx
   // data
@@ -3084,10 +3084,10 @@ public:
                                   GBool printing,
                                   GfxImageColorMap *colorMapA,
                                   int *maskColorsA) {
-    cairo_surface_t *image = NULL;
+    cairo_surface_t *image = nullptr;
     int i;
 
-    lookup = NULL;
+    lookup = nullptr;
     colorMap = colorMapA;
     maskColors = maskColorsA;
     width = widthA;
@@ -3204,7 +3204,7 @@ public:
       current_row++;
     }
 
-    if (unlikely(pix == NULL)) {
+    if (unlikely(pix == nullptr)) {
       memset(row_data, 0, width*4);
       if (!imageError) {
 	error(errInternal, -1, "Bad image stream");
@@ -3310,7 +3310,7 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   } else if (mask) {
     maskPattern = cairo_pattern_reference (mask);
   } else {
-    maskPattern = NULL;
+    maskPattern = nullptr;
   }
 
   cairo_save (cairo);
@@ -3355,11 +3355,11 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
 
 CairoImageOutputDev::CairoImageOutputDev()
 {
-  images = NULL;
+  images = nullptr;
   numImages = 0;
   size = 0;
-  imgDrawCbk = NULL;
-  imgDrawCbkData = NULL;
+  imgDrawCbk = nullptr;
+  imgDrawCbkData = nullptr;
 }
 
 CairoImageOutputDev::~CairoImageOutputDev()
@@ -3432,7 +3432,7 @@ void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *st
     CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
     image->setImage (surface);
 
-    setCairo (NULL);
+    setCairo (nullptr);
     cairo_surface_destroy (surface);
     cairo_destroy (cr);
   }
@@ -3465,7 +3465,7 @@ void CairoImageOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref,
     }
     image->setImage (surface);
 
-    setCairo (NULL);
+    setCairo (nullptr);
     cairo_surface_destroy (surface);
     cairo_destroy (cr);
   }
@@ -3495,7 +3495,7 @@ void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
     CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg);
     image->setImage (surface);
     
-    setCairo (NULL);
+    setCairo (nullptr);
     cairo_surface_destroy (surface);
     cairo_destroy (cr);
   }
@@ -3531,7 +3531,7 @@ void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stre
 					maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
     image->setImage (surface);
     
-    setCairo (NULL);
+    setCairo (nullptr);
     cairo_surface_destroy (surface);
     cairo_destroy (cr);
   }
@@ -3566,7 +3566,7 @@ void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *
 				    maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
     image->setImage (surface);
     
-    setCairo (NULL);
+    setCairo (nullptr);
     cairo_surface_destroy (surface);
     cairo_destroy (cr);
   }
diff --git a/poppler/CairoRescaleBox.cc b/poppler/CairoRescaleBox.cc
index aa9e9e7d..f34b1e1c 100644
--- a/poppler/CairoRescaleBox.cc
+++ b/poppler/CairoRescaleBox.cc
@@ -271,9 +271,9 @@ GBool CairoRescaleBox::downScaleImage(unsigned orig_width, unsigned orig_height,
   int dest_y;
   int src_y = 0;
   uint32_t *scanline;
-  int *x_coverage = NULL;
-  int *y_coverage = NULL;
-  uint32_t *temp_buf = NULL;
+  int *x_coverage = nullptr;
+  int *y_coverage = nullptr;
+  uint32_t *temp_buf = nullptr;
   GBool retval = gFalse;
   unsigned int *dest;
   int dst_stride;
diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index 36678213..d01b23d4 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -80,26 +80,26 @@ Catalog::Catalog(PDFDoc *docA) {
   ok = gTrue;
   doc = docA;
   xref = doc->getXRef();
-  pages = NULL;
-  pageRefs = NULL;
+  pages = nullptr;
+  pageRefs = nullptr;
   numPages = -1;
   pagesSize = 0;
-  baseURI = NULL;
-  pageLabelInfo = NULL;
-  form = NULL;
-  optContent = NULL;
+  baseURI = nullptr;
+  pageLabelInfo = nullptr;
+  form = nullptr;
+  optContent = nullptr;
   pageMode = pageModeNull;
   pageLayout = pageLayoutNull;
-  destNameTree = NULL;
-  embeddedFileNameTree = NULL;
-  jsNameTree = NULL;
-  viewerPrefs = NULL;
-  structTreeRoot = NULL;
-
-  pagesList = NULL;
-  pagesRefList = NULL;
-  attrsList = NULL;
-  kidsIdxList = NULL;
+  destNameTree = nullptr;
+  embeddedFileNameTree = nullptr;
+  jsNameTree = nullptr;
+  viewerPrefs = nullptr;
+  structTreeRoot = nullptr;
+
+  pagesList = nullptr;
+  pagesRefList = nullptr;
+  attrsList = nullptr;
+  kidsIdxList = nullptr;
   lastCachedPage = 0;
   markInfo = markInfoNull;
 
@@ -127,7 +127,7 @@ Catalog::Catalog(PDFDoc *docA) {
     optContent = new OCGs(&optContentProps, xref);
     if (!optContent->isOk ()) {
       delete optContent;
-      optContent = NULL;
+      optContent = nullptr;
     }
   }
 
@@ -202,13 +202,13 @@ GooString *Catalog::readMetadata() {
 
 Page *Catalog::getPage(int i)
 {
-  if (i < 1) return NULL;
+  if (i < 1) return nullptr;
 
   catalogLocker();
   if (i > lastCachedPage) {
      GBool cached = cachePageTree(i);
      if ( cached == gFalse) {
-       return NULL;
+       return nullptr;
      }
   }
   return pages[i-1];
@@ -216,13 +216,13 @@ Page *Catalog::getPage(int i)
 
 Ref *Catalog::getPageRef(int i)
 {
-  if (i < 1) return NULL;
+  if (i < 1) return nullptr;
 
   catalogLocker();
   if (i > lastCachedPage) {
      GBool cached = cachePageTree(i);
      if ( cached == gFalse) {
-       return NULL;
+       return nullptr;
      }
   }
   return &pageRefs[i-1];
@@ -230,7 +230,7 @@ Ref *Catalog::getPageRef(int i)
 
 GBool Catalog::cachePageTree(int page)
 {
-  if (pagesList == NULL) {
+  if (pagesList == nullptr) {
 
     Ref pagesRef;
 
@@ -262,19 +262,19 @@ GBool Catalog::cachePageTree(int page)
     pagesSize = getNumPages();
     pages = (Page **)gmallocn_checkoverflow(pagesSize, sizeof(Page *));
     pageRefs = (Ref *)gmallocn_checkoverflow(pagesSize, sizeof(Ref));
-    if (pages == NULL || pageRefs == NULL ) {
+    if (pages == nullptr || pageRefs == nullptr ) {
       error(errSyntaxError, -1, "Cannot allocate page cache");
       pagesSize = 0;
       return gFalse;
     }
     for (int i = 0; i < pagesSize; ++i) {
-      pages[i] = NULL;
+      pages[i] = nullptr;
       pageRefs[i].num = -1;
       pageRefs[i].gen = -1;
     }
 
     attrsList = new std::vector<PageAttrs *>();
-    attrsList->push_back(new PageAttrs(NULL, obj.getDict()));
+    attrsList->push_back(new PageAttrs(nullptr, obj.getDict()));
     pagesList = new std::vector<Object>();
     pagesList->push_back(std::move(obj));
     pagesRefList = new std::vector<Ref>();
@@ -376,7 +376,7 @@ int Catalog::findPage(int num, int gen) {
 
   for (i = 0; i < getNumPages(); ++i) {
     Ref *ref = getPageRef(i+1);
-    if (ref != NULL && ref->num == num && ref->gen == gen)
+    if (ref != nullptr && ref->num == num && ref->gen == gen)
       return i + 1;
   }
   return 0;
@@ -410,7 +410,7 @@ LinkDest *Catalog::createLinkDest(Object *obj)
   }
   if (dest && !dest->isOk()) {
     delete dest;
-    dest = NULL;
+    dest = nullptr;
   }
 
   return dest;
@@ -433,7 +433,7 @@ char *Catalog::getDestsName(int i)
 
   obj= getDests();
   if (!obj->isDict()) {
-    return NULL;
+    return nullptr;
   }
   return obj->dictGetKey(i);
 }
@@ -442,7 +442,7 @@ LinkDest *Catalog::getDestsDest(int i)
 {
   Object *obj = getDests();
   if (!obj->isDict()) {
-    return NULL;
+    return nullptr;
   }
   Object obj1 = obj->dictGetVal(i);
   return createLinkDest(&obj1);
@@ -465,7 +465,7 @@ FileSpec *Catalog::embeddedFile(int i)
     Object efDict;
     catalogLocker();
     Object *obj = getEmbeddedFileNameTree()->getValue(i);
-    FileSpec *embeddedFile = 0;
+    FileSpec *embeddedFile = nullptr;
     if (obj->isRef()) {
       Object fsDict = obj->fetch(xref);
       embeddedFile = new FileSpec(&fsDict);
@@ -581,7 +581,7 @@ NameTree::NameTree()
 {
   size = 0;
   length = 0;
-  entries = NULL;
+  entries = nullptr;
 }
 
 NameTree::~NameTree()
@@ -691,7 +691,7 @@ Object NameTree::lookup(GooString *name)
 
   entry = (Entry **) bsearch(name, entries,
 			     length, sizeof(Entry *), Entry::cmp);
-  if (entry != NULL) {
+  if (entry != nullptr) {
     return (*entry)->value.fetch(xref);
   } else {
     error(errSyntaxError, -1, "failed to look up ({0:s})", name->getCString());
@@ -713,7 +713,7 @@ GooString *NameTree::getName(int index)
     if (index < length) {
 	return &entries[index]->name;
     } else {
-	return NULL;
+	return nullptr;
     }
 }
 
@@ -722,7 +722,7 @@ GBool Catalog::labelToIndex(GooString *label, int *index)
   char *end;
 
   PageLabelInfo *pli = getPageLabelInfo();
-  if (pli != NULL) {
+  if (pli != nullptr) {
     if (!pli->labelToIndex(label, index))
       return gFalse;
   } else {
@@ -745,7 +745,7 @@ GBool Catalog::indexToLabel(int index, GooString *label)
     return gFalse;
 
   PageLabelInfo *pli = getPageLabelInfo();
-  if (pli != NULL) {
+  if (pli != nullptr) {
     return pli->indexToLabel(index, label);
   } else {
     snprintf(buffer, sizeof (buffer), "%d", index + 1);
@@ -785,7 +785,7 @@ int Catalog::getNumPages()
 	Dict *pageDict = pagesDict.getDict();
 	if (pageRootRef.isRef()) {
 	  const Ref pageRef = pageRootRef.getRef();
-	  Page *p = new Page(doc, 1, &pagesDict, pageRef, new PageAttrs(NULL, pageDict), form);
+	  Page *p = new Page(doc, 1, &pagesDict, pageRef, new PageAttrs(nullptr, pageDict), form);
 	  if (p->isOk()) {
 	    pages = (Page **)gmallocn(1, sizeof(Page *));
 	    pageRefs = (Ref *)gmallocn(1, sizeof(Ref));
@@ -854,7 +854,7 @@ StructTreeRoot *Catalog::getStructTreeRoot()
     Object catalog = xref->getCatalog();
     if (!catalog.isDict()) {
       error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catalog.getTypeName());
-      return NULL;
+      return nullptr;
     }
 
     Object root = catalog.dictLookup("StructTreeRoot");
@@ -1052,7 +1052,7 @@ LinkAction* Catalog::getAdditionalAction(DocumentAdditionalActionsType type) {
                        type == actionSaveDocumentStart ?   "WS" :
                        type == actionSaveDocumentFinish ?  "DS" :
                        type == actionPrintDocumentStart ?  "WP" :
-                       type == actionPrintDocumentFinish ? "DP" : NULL);
+                       type == actionPrintDocumentFinish ? "DP" : nullptr);
 
     Object actionObject = additionalActionsObject.dictLookup(key);
     if (actionObject.isDict())
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index abf5d51c..17df0292 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -137,7 +137,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(GooString *fileName,
   if (!(f = openFile(fileName->getCString(), "r"))) {
     error(errIO, -1, "Couldn't open cidToUnicode file '{0:t}'",
 	  fileName);
-    return NULL;
+    return nullptr;
   }
 
   size = 32768;
@@ -161,7 +161,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(GooString *fileName,
   fclose(f);
 
   ctu = new CharCodeToUnicode(collection->copy(), mapA, mapLenA, gTrue,
-			      NULL, 0, 0);
+			      nullptr, 0, 0);
   gfree(mapA);
   return ctu;
 }
@@ -185,14 +185,14 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(
     gfree(uBuf);
     error(errIO, -1, "Couldn't open unicodeToUnicode file '{0:t}'",
 	  fileName);
-    return NULL;
+    return nullptr;
   }
 
   size = 4096;
   mapA = (Unicode *)gmallocn(size, sizeof(Unicode));
   memset(mapA, 0, size * sizeof(Unicode));
   len = 0;
-  sMapA = NULL;
+  sMapA = nullptr;
   sMapSizeA = sMapLenA = 0;
 
   line = 0;
@@ -205,7 +205,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(
       continue;
     }
     n = 0;
-    while ((tok = strtok_r(NULL, " \t\r\n", &tokptr))) {
+    while ((tok = strtok_r(nullptr, " \t\r\n", &tokptr))) {
       if (n >= uBufSize)
       {
         uBufSize += 8;
@@ -262,14 +262,14 @@ CharCodeToUnicode *CharCodeToUnicode::parseUnicodeToUnicode(
 }
 
 CharCodeToUnicode *CharCodeToUnicode::make8BitToUnicode(Unicode *toUnicode) {
-  return new CharCodeToUnicode(NULL, toUnicode, 256, gTrue, NULL, 0, 0);
+  return new CharCodeToUnicode(nullptr, toUnicode, 256, gTrue, nullptr, 0, 0);
 }
 
 CharCodeToUnicode *CharCodeToUnicode::parseCMap(GooString *buf, int nBits) {
   CharCodeToUnicode *ctu;
   char *p;
 
-  ctu = new CharCodeToUnicode(NULL);
+  ctu = new CharCodeToUnicode(nullptr);
   p = buf->getCString();
   ctu->parseCMap1(&getCharFromString, &p, nBits);
   return ctu;
@@ -280,7 +280,7 @@ CharCodeToUnicode *CharCodeToUnicode::parseCMapFromFile(GooString *fileName,
   CharCodeToUnicode *ctu;
   FILE *f;
 
-  ctu = new CharCodeToUnicode(NULL);
+  ctu = new CharCodeToUnicode(nullptr);
   if ((f = globalParams->findToUnicodeFile(fileName))) {
     ctu->parseCMap1(&getCharFromFile, f, nBits);
     fclose(f);
@@ -479,10 +479,10 @@ void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n,
 }
 
 CharCodeToUnicode::CharCodeToUnicode() {
-  tag = NULL;
-  map = NULL;
+  tag = nullptr;
+  map = nullptr;
   mapLen = 0;
-  sMap = NULL;
+  sMap = nullptr;
   sMapLen = sMapSize = 0;
   refCnt = 1;
   isIdentity = gFalse;
@@ -500,7 +500,7 @@ CharCodeToUnicode::CharCodeToUnicode(GooString *tagA) {
   for (i = 0; i < mapLen; ++i) {
     map[i] = 0;
   }
-  sMap = NULL;
+  sMap = nullptr;
   sMapLen = sMapSize = 0;
   refCnt = 1;
   isIdentity = gFalse;
@@ -681,7 +681,7 @@ CharCodeToUnicodeCache::CharCodeToUnicodeCache(int sizeA) {
   size = sizeA;
   cache = (CharCodeToUnicode **)gmallocn(size, sizeof(CharCodeToUnicode *));
   for (i = 0; i < size; ++i) {
-    cache[i] = NULL;
+    cache[i] = nullptr;
   }
 }
 
@@ -715,7 +715,7 @@ CharCodeToUnicode *CharCodeToUnicodeCache::getCharCodeToUnicode(GooString *tag)
       return ctu;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 void CharCodeToUnicodeCache::add(CharCodeToUnicode *ctu) {
diff --git a/poppler/CurlCachedFile.cc b/poppler/CurlCachedFile.cc
index af4c2b60..907baafe 100644
--- a/poppler/CurlCachedFile.cc
+++ b/poppler/CurlCachedFile.cc
@@ -20,9 +20,9 @@
 
 CurlCachedFileLoader::CurlCachedFileLoader()
 {
-  url = NULL;
-  cachedFile = NULL;
-  curl = NULL;
+  url = nullptr;
+  cachedFile = nullptr;
+  curl = nullptr;
 }
 
 CurlCachedFileLoader::~CurlCachedFileLoader() {
diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index 7a4d5930..4665ca83 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -64,7 +64,7 @@ static void str_term_source(j_decompress_ptr cinfo)
 DCTStream::DCTStream(Stream *strA, int colorXformA, Dict *dict, int recursion) :
   FilterStream(strA) {
   colorXform = colorXformA;
-  if (dict != NULL) {
+  if (dict != nullptr) {
     Object obj = dict->lookup("Width", recursion);
     err.width = (obj.isInt() && obj.getInt() <= JPEG_MAX_DIMENSION) ? obj.getInt() : 0;
     obj = dict->lookup("Height", recursion);
@@ -100,18 +100,18 @@ void DCTStream::init()
   src.pub.resync_to_restart = jpeg_resync_to_restart;
   src.pub.term_source = str_term_source;
   src.pub.bytes_in_buffer = 0;
-  src.pub.next_input_byte = NULL;
+  src.pub.next_input_byte = nullptr;
   src.str = str;
   src.index = 0;
-  current = NULL;
-  limit = NULL;
+  current = nullptr;
+  limit = nullptr;
   
   cinfo.err = &err.pub;
   if (!setjmp(err.setjmp_buffer)) {
     jpeg_create_decompress(&cinfo);
     cinfo.src = (jpeg_source_mgr *)&src;
   }
-  row_buffer = NULL;
+  row_buffer = nullptr;
 }
 
 void DCTStream::reset() {
@@ -241,7 +241,7 @@ int DCTStream::getChars(int nChars, Guchar *buffer) {
 }
 
 int DCTStream::lookChar() {
-  if (unlikely(current == NULL)) {
+  if (unlikely(current == nullptr)) {
     return EOF;
   }
   return *current;
@@ -251,10 +251,10 @@ GooString *DCTStream::getPSFilter(int psLevel, const char *indent) {
   GooString *s;
 
   if (psLevel < 2) {
-    return NULL;
+    return nullptr;
   }
   if (!(s = str->getPSFilter(psLevel, indent))) {
-    return NULL;
+    return nullptr;
   }
   s->append(indent)->append("<< >> /DCTDecode filter\n");
   return s;
diff --git a/poppler/DateInfo.cc b/poppler/DateInfo.cc
index fef3f00a..532e0070 100644
--- a/poppler/DateInfo.cc
+++ b/poppler/DateInfo.cc
@@ -32,7 +32,7 @@
 /* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */
 GBool parseDateString(const char *dateString, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute)
 {
-    if ( dateString == NULL ) return gFalse;
+    if ( dateString == nullptr ) return gFalse;
     if ( strlen(dateString) < 2 ) return gFalse;
 
     if ( dateString[0] == 'D' && dateString[1] == ':' )
@@ -82,7 +82,7 @@ GooString *timeToDateString(time_t *timet) {
   char s[5];
   struct tm *gt;
   size_t len;
-  time_t timep = timet ? *timet : time(NULL);
+  time_t timep = timet ? *timet : time(nullptr);
   struct tm t;
 
   gt = gmtime_r (&timep, &t);
diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc
index db755812..423928e7 100644
--- a/poppler/Decrypt.cc
+++ b/poppler/Decrypt.cc
@@ -143,7 +143,7 @@ GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength,
       if(encRevision == 6) {
 	// test contains the initial SHA-256 hash input K.
 	// user key is not used in checking user password.
-	revision6Hash(userPassword, test, NULL);
+	revision6Hash(userPassword, test, nullptr);
       }
       if (!memcmp(test, userKey->getCString(), 32)) {
 
@@ -154,7 +154,7 @@ GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength,
 	if(encRevision == 6) {
 	  //test contains the initial SHA-256 hash input K.
 	  //user key is not used in computing intermediate user key.
-	  revision6Hash(userPassword, test, NULL);
+	  revision6Hash(userPassword, test, nullptr);
 	}
 	aes256KeyExpansion(&state, test, 32, gTrue);
 	for (i = 0; i < 16; ++i) {
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index 89814708..a431f7eb 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -78,7 +78,7 @@ static int binarySearch(const char *key, DictEntry *entries, int length)
 
 Dict::Dict(XRef *xrefA) {
   xref = xrefA;
-  entries = NULL;
+  entries = nullptr;
   size = length = 0;
   ref = 1;
   sorted = gFalse;
@@ -185,11 +185,11 @@ inline DictEntry *Dict::find(const char *key) const {
         return &entries[i];
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 GBool Dict::hasKey(const char *key) const {
-  return find(key) != NULL;
+  return find(key) != nullptr;
 }
 
 void Dict::remove(const char *key) {
@@ -270,7 +270,7 @@ GBool Dict::lookupInt(const char *key, const char *alt_key, int *value) const
 {
   GBool success = gFalse;
   Object obj1 = lookup ((char *) key);
-  if (obj1.isNull () && alt_key != NULL) {
+  if (obj1.isNull () && alt_key != nullptr) {
     obj1.free ();
     obj1 = lookup ((char *) alt_key);
   }
diff --git a/poppler/Error.cc b/poppler/Error.cc
index ab43654d..356f7972 100644
--- a/poppler/Error.cc
+++ b/poppler/Error.cc
@@ -50,8 +50,8 @@ static const char *errorCategoryNames[] = {
 };
 
 static void (*errorCbk)(void *data, ErrorCategory category,
-			Goffset pos, char *msg) = NULL;
-static void *errorCbkData = NULL;
+			Goffset pos, char *msg) = nullptr;
+static void *errorCbkData = nullptr;
 
 void setErrorCallback(void (*cbk)(void *data, ErrorCategory category,
 				  Goffset pos, char *msg),
diff --git a/poppler/FileSpec.cc b/poppler/FileSpec.cc
index 5ebef977..89894e23 100644
--- a/poppler/FileSpec.cc
+++ b/poppler/FileSpec.cc
@@ -30,10 +30,10 @@
 EmbFile::EmbFile(Object *efStream)
 {
   m_size = -1;
-  m_createDate = NULL;
-  m_modDate = NULL;
-  m_checksum = NULL;
-  m_mimetype = NULL;
+  m_createDate = nullptr;
+  m_modDate = nullptr;
+  m_checksum = nullptr;
+  m_mimetype = nullptr;
 
   m_objStr = efStream->copy();
 
@@ -102,10 +102,10 @@ GBool EmbFile::save2(FILE *f) {
 FileSpec::FileSpec(Object *fileSpecA)
 {
   ok = gTrue;
-  fileName = NULL;
-  platformFileName = NULL;
-  embFile = NULL;
-  desc = NULL;
+  fileName = nullptr;
+  platformFileName = nullptr;
+  embFile = nullptr;
+  desc = nullptr;
   fileSpec = fileSpecA->copy();
 
   Object obj1 = getFileSpecName(fileSpecA);
@@ -146,7 +146,7 @@ FileSpec::~FileSpec()
 EmbFile *FileSpec::getEmbeddedFile()
 {
   if(!ok)
-    return NULL;
+    return nullptr;
 
   if (embFile)
     return embFile;
diff --git a/poppler/FontEncodingTables.cc b/poppler/FontEncodingTables.cc
index 6ebef787..4a1f64a6 100644
--- a/poppler/FontEncodingTables.cc
+++ b/poppler/FontEncodingTables.cc
@@ -11,38 +11,38 @@
 #include "FontEncodingTables.h"
 
 const char *macRomanEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclam",
   "quotedbl",
@@ -138,7 +138,7 @@ const char *macRomanEncoding[256] = {
   "bar",
   "braceright",
   "asciitilde",
-  NULL,
+  nullptr,
   "Adieresis",
   "Aring",
   "Ccedilla",
@@ -270,38 +270,38 @@ const char *macRomanEncoding[256] = {
 };
 
 const char *macExpertEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclamsmall",
   "Hungarumlautsmall",
@@ -330,17 +330,17 @@ const char *macExpertEncoding[256] = {
   "nineoldstyle",
   "colon",
   "semicolon",
-  NULL,
+  nullptr,
   "threequartersemdash",
-  NULL,
+  nullptr,
   "questionsmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Ethsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "onequarter",
   "onehalf",
   "threequarters",
@@ -350,19 +350,19 @@ const char *macExpertEncoding[256] = {
   "seveneighths",
   "onethird",
   "twothirds",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "ff",
   "fi",
   "fl",
   "ffi",
   "ffl",
   "parenleftinferior",
-  NULL,
+  nullptr,
   "parenrightinferior",
   "Circumflexsmall",
   "hypheninferior",
@@ -397,14 +397,14 @@ const char *macExpertEncoding[256] = {
   "onefitted",
   "rupiah",
   "Tildesmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "asuperior",
   "centsuperior",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Aacutesmall",
   "Agravesmall",
   "Acircumflexsmall",
@@ -430,7 +430,7 @@ const char *macExpertEncoding[256] = {
   "Ugravesmall",
   "Ucircumflexsmall",
   "Udieresissmall",
-  NULL,
+  nullptr,
   "eightsuperior",
   "fourinferior",
   "threeinferior",
@@ -438,25 +438,25 @@ const char *macExpertEncoding[256] = {
   "eightinferior",
   "seveninferior",
   "Scaronsmall",
-  NULL,
+  nullptr,
   "centinferior",
   "twoinferior",
-  NULL,
+  nullptr,
   "Dieresissmall",
-  NULL,
+  nullptr,
   "Caronsmall",
   "osuperior",
   "fiveinferior",
-  NULL,
+  nullptr,
   "commainferior",
   "periodinferior",
   "Yacutesmall",
-  NULL,
+  nullptr,
   "dollarinferior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Thornsmall",
-  NULL,
+  nullptr,
   "nineinferior",
   "zeroinferior",
   "Zcaronsmall",
@@ -465,29 +465,29 @@ const char *macExpertEncoding[256] = {
   "questiondownsmall",
   "oneinferior",
   "Lslashsmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Cedillasmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "OEsmall",
   "figuredash",
   "hyphensuperior",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "exclamdownsmall",
-  NULL,
+  nullptr,
   "Ydieresissmall",
-  NULL,
+  nullptr,
   "onesuperior",
   "twosuperior",
   "threesuperior",
@@ -497,20 +497,20 @@ const char *macExpertEncoding[256] = {
   "sevensuperior",
   "ninesuperior",
   "zerosuperior",
-  NULL,
+  nullptr,
   "esuperior",
   "rsuperior",
   "tsuperior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "isuperior",
   "ssuperior",
   "dsuperior",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "lsuperior",
   "Ogoneksmall",
   "Brevesmall",
@@ -522,45 +522,45 @@ const char *macExpertEncoding[256] = {
   "periodsuperior",
   "Dotaccentsmall",
   "Ringsmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr
 };
 
 const char *winAnsiEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclam",
   "quotedbl",
@@ -788,38 +788,38 @@ const char *winAnsiEncoding[256] = {
 };
 
 const char *standardEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclam",
   "quotedbl",
@@ -915,40 +915,40 @@ const char *standardEncoding[256] = {
   "bar",
   "braceright",
   "asciitilde",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "exclamdown",
   "cent",
   "sterling",
@@ -964,12 +964,12 @@ const char *standardEncoding[256] = {
   "guilsinglright",
   "fi",
   "fl",
-  NULL,
+  nullptr,
   "endash",
   "dagger",
   "daggerdbl",
   "periodcentered",
-  NULL,
+  nullptr,
   "paragraph",
   "bullet",
   "quotesinglbase",
@@ -978,9 +978,9 @@ const char *standardEncoding[256] = {
   "guillemotright",
   "ellipsis",
   "perthousand",
-  NULL,
+  nullptr,
   "questiondown",
-  NULL,
+  nullptr,
   "grave",
   "acute",
   "circumflex",
@@ -989,100 +989,100 @@ const char *standardEncoding[256] = {
   "breve",
   "dotaccent",
   "dieresis",
-  NULL,
+  nullptr,
   "ring",
   "cedilla",
-  NULL,
+  nullptr,
   "hungarumlaut",
   "ogonek",
   "caron",
   "emdash",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "AE",
-  NULL,
+  nullptr,
   "ordfeminine",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Lslash",
   "Oslash",
   "OE",
   "ordmasculine",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "ae",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "dotlessi",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "lslash",
   "oslash",
   "oe",
   "germandbls",
-  NULL,
-  NULL,
-  NULL,
-  NULL
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr
 };
 
 const char *expertEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclamsmall",
   "Hungarumlautsmall",
-  NULL,
+  nullptr,
   "dollaroldstyle",
   "dollarsuperior",
   "ampersandsmall",
@@ -1111,35 +1111,35 @@ const char *expertEncoding[256] = {
   "threequartersemdash",
   "periodsuperior",
   "questionsmall",
-  NULL,
+  nullptr,
   "asuperior",
   "bsuperior",
   "centsuperior",
   "dsuperior",
   "esuperior",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "isuperior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "lsuperior",
   "msuperior",
   "nsuperior",
   "osuperior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "rsuperior",
   "ssuperior",
   "tsuperior",
-  NULL,
+  nullptr,
   "ff",
   "fi",
   "fl",
   "ffi",
   "ffl",
   "parenleftinferior",
-  NULL,
+  nullptr,
   "parenrightinferior",
   "Circumflexsmall",
   "hyphensuperior",
@@ -1174,67 +1174,67 @@ const char *expertEncoding[256] = {
   "onefitted",
   "rupiah",
   "Tildesmall",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "exclamdownsmall",
   "centoldstyle",
   "Lslashsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Scaronsmall",
   "Zcaronsmall",
   "Dieresissmall",
   "Brevesmall",
   "Caronsmall",
-  NULL,
+  nullptr,
   "Dotaccentsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Macronsmall",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "figuredash",
   "hypheninferior",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "Ogoneksmall",
   "Ringsmall",
   "Cedillasmall",
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
   "onequarter",
   "onehalf",
   "threequarters",
@@ -1245,8 +1245,8 @@ const char *expertEncoding[256] = {
   "seveneighths",
   "onethird",
   "twothirds",
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
   "zerosuperior",
   "onesuperior",
   "twosuperior",
@@ -1306,38 +1306,38 @@ const char *expertEncoding[256] = {
 };
 
 const char *symbolEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "exclam",
   "universal",
@@ -1433,40 +1433,40 @@ const char *symbolEncoding[256] = {
   "bar",
   "braceright",
   "similar",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "Upsilon1",
   "minute",
   "lessequal",
@@ -1546,7 +1546,7 @@ const char *symbolEncoding[256] = {
   "braceleftmid",
   "braceleftbt",
   "braceex",
-  NULL,
+  nullptr,
   "angleright",
   "integral",
   "integraltp",
@@ -1561,42 +1561,42 @@ const char *symbolEncoding[256] = {
   "bracerighttp",
   "bracerightmid",
   "bracerightbt",
-  NULL
+  nullptr
 };
 
 const char *zapfDingbatsEncoding[256] = {
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "space",
   "a1",
   "a2",
@@ -1692,40 +1692,40 @@ const char *zapfDingbatsEncoding[256] = {
   "a98",
   "a99",
   "a100",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
+  nullptr,
   "a101",
   "a102",
   "a103",
@@ -1805,7 +1805,7 @@ const char *zapfDingbatsEncoding[256] = {
   "a181",
   "a200",
   "a182",
-  NULL,
+  nullptr,
   "a201",
   "a183",
   "a184",
@@ -1820,5 +1820,5 @@ const char *zapfDingbatsEncoding[256] = {
   "a189",
   "a190",
   "a191",
-  NULL
+  nullptr
 };
diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc
index 3730f529..0bc0020a 100644
--- a/poppler/FontInfo.cc
+++ b/poppler/FontInfo.cc
@@ -57,7 +57,7 @@ GooList *FontInfoScanner::scan(int nPages) {
   int lastPage;
 
   if (currentPage > doc->getNumPages()) {
-    return NULL;
+    return nullptr;
   }
  
   result = new GooList();
@@ -97,7 +97,7 @@ void FontInfoScanner::scanFonts(XRef *xrefA, Dict *resDict, GooList *fontsList)
   GfxFont *font;
 
   // scan the fonts in this resource dictionary
-  gfxFontDict = NULL;
+  gfxFontDict = nullptr;
   Object obj1 = resDict->lookupNF("Font");
   if (obj1.isRef()) {
     Object obj2 = obj1.fetch(xrefA);
@@ -106,7 +106,7 @@ void FontInfoScanner::scanFonts(XRef *xrefA, Dict *resDict, GooList *fontsList)
       gfxFontDict = new GfxFontDict(xrefA, &r, obj2.getDict());
     }
   } else if (obj1.isDict()) {
-    gfxFontDict = new GfxFontDict(xrefA, NULL, obj1.getDict());
+    gfxFontDict = new GfxFontDict(xrefA, nullptr, obj1.getDict());
   }
   if (gfxFontDict) {
     for (int i = 0; i < gfxFontDict->getNumFonts(); ++i) {
@@ -160,10 +160,10 @@ FontInfo::FontInfo(GfxFont *font, XRef *xref) {
 
   // font name
   origName = font->getName();
-  if (origName != NULL) {
+  if (origName != nullptr) {
     name = font->getName()->copy();
   } else {
-    name = NULL;
+    name = nullptr;
   }
 
   // font type
@@ -176,8 +176,8 @@ FontInfo::FontInfo(GfxFont *font, XRef *xref) {
     emb = font->getEmbeddedFontID(&embRef);
   }
 
-  file = NULL;
-  substituteName = NULL;
+  file = nullptr;
+  substituteName = nullptr;
   if (!emb)
   {
     SysFontType dummy;
@@ -211,10 +211,10 @@ FontInfo::FontInfo(GfxFont *font, XRef *xref) {
 }
 
 FontInfo::FontInfo(FontInfo& f) {
-  name = f.name ? f.name->copy() : NULL;
-  file = f.file ? f.file->copy() : NULL;
-  encoding = f.encoding ? f.encoding->copy() : NULL;
-  substituteName = f.substituteName ? f.substituteName->copy() : NULL;
+  name = f.name ? f.name->copy() : nullptr;
+  file = f.file ? f.file->copy() : nullptr;
+  encoding = f.encoding ? f.encoding->copy() : nullptr;
+  substituteName = f.substituteName ? f.substituteName->copy() : nullptr;
   type = f.type;
   emb = f.emb;
   subset = f.subset;
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 3c23dd3f..71397c4f 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -94,7 +94,7 @@ FormWidget::FormWidget(PDFDoc *docA, Object *aobj, unsigned num, Ref aref, FormF
   obj = aobj->copy();
   type = formUndef;
   field = fieldA;
-  widget = NULL;
+  widget = nullptr;
 }
 
 FormWidget::~FormWidget()
@@ -168,18 +168,18 @@ GooString *FormWidget::getFullyQualifiedName() {
 }
 
 LinkAction *FormWidget::getActivationAction() {
-  return widget ? widget->getAction() : NULL;
+  return widget ? widget->getAction() : nullptr;
 }
 
 LinkAction *FormWidget::getAdditionalAction(Annot::FormAdditionalActionsType type) {
-  return widget ? widget->getFormAdditionalAction(type) : NULL;
+  return widget ? widget->getFormAdditionalAction(type) : nullptr;
 }
 
 FormWidgetButton::FormWidgetButton (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) :
 	FormWidget(docA, aobj, num, ref, p)
 {
   type = formButton;
-  onStr = NULL;
+  onStr = nullptr;
 
   // Find the name of the ON state in the AP dictionnary
   // The reference say the Off state, if it existe, _must_ be stored in the AP dict under the name /Off
@@ -205,7 +205,7 @@ char *FormWidgetButton::getOnStr() {
 
   // 12.7.4.2.3 Check Boxes
   //  Yes should be used as the name for the on state
-  return parent()->getButtonType() == formButtonCheck ? (char *)"Yes" : NULL;
+  return parent()->getButtonType() == formButtonCheck ? (char *)"Yes" : nullptr;
 }
 
 FormWidgetButton::~FormWidgetButton ()
@@ -376,7 +376,7 @@ GooString* FormWidgetChoice::getEditChoice ()
 {
   if (!hasEdit()) {
     error(errInternal, -1, "FormFieldChoice::getEditChoice called on a non-editable choice\n");
-    return NULL;
+    return nullptr;
   }
   return parent()->getEditChoice();
 }
@@ -618,12 +618,12 @@ FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *par
   type = ty;
   parent = parentA;
   numChildren = 0;
-  children = NULL;
+  children = nullptr;
   terminal = false;
-  widgets = NULL;
+  widgets = nullptr;
   readOnly = false;
-  defaultAppearance = NULL;
-  fullyQualifiedName = NULL;
+  defaultAppearance = nullptr;
+  fullyQualifiedName = nullptr;
   quadding = quaddingLeftJustified;
   hasQuadding = gFalse;
 
@@ -715,21 +715,21 @@ FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *par
   if (obj1.isString()) {
     partialName = obj1.getString()->copy();
   } else {
-    partialName = NULL;
+    partialName = nullptr;
   }
 
   obj1 = dict->lookup("TU");
   if (obj1.isString()) {
     alternateUiName = obj1.getString()->copy();
   } else {
-    alternateUiName = NULL;
+    alternateUiName = nullptr;
   }
 
   obj1 = dict->lookup("TM");
   if(obj1.isString()) {
     mappingName = obj1.getString()->copy();
   } else {
-    mappingName = NULL;
+    mappingName = nullptr;
   }
 }
 
@@ -841,7 +841,7 @@ FormWidget* FormField::findWidgetByRef (Ref aref)
       if(result) return result;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 GooString* FormField::getFullyQualifiedName() {
@@ -948,7 +948,7 @@ FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, For
   Dict* dict = obj.getDict();
   active_child = -1;
   noAllOff = false;
-  siblings = NULL;
+  siblings = nullptr;
   numSiblings = 0;
   appearanceState.setToNull();
 
@@ -1011,7 +1011,7 @@ void FormFieldButton::fillChildrenSiblingsID()
   if (!terminal) {
     for(int i=0; i<numChildren; i++) {
       FormFieldButton *child = dynamic_cast<FormFieldButton*>(children[i]);
-      if (child != NULL) {
+      if (child != nullptr) {
         // Fill the siblings of this node childs
         child->setNumSiblings(numChildren-1);
         for(int j=0, counter=0; j<numChildren; j++) {
@@ -1116,7 +1116,7 @@ FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormFie
 {
   Dict* dict = obj.getDict();
   Object obj1;
-  content = NULL;
+  content = nullptr;
   multiline = password = fileSelect = doNotSpellCheck = doNotScroll = comb = richText = false;
   maxLen = 0;
 
@@ -1169,14 +1169,14 @@ void FormFieldText::print(int indent)
 
 GooString* FormFieldText::getContentCopy ()
 {
-  if (!content) return NULL;
+  if (!content) return nullptr;
   return new GooString(content);
 }
 
 void FormFieldText::setContentCopy (GooString* new_content)
 {
   delete content;
-  content = NULL;
+  content = nullptr;
 
   if (new_content) {
     content = new_content->copy();
@@ -1286,8 +1286,8 @@ FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, For
   : FormField(docA, aobj, ref, parent, usedParents, formChoice)
 {
   numChoices = 0;
-  choices = NULL;
-  editedChoice = NULL;
+  choices = nullptr;
+  editedChoice = nullptr;
   topIdx = 0;
 
   Dict* dict = obj.getDict();
@@ -1501,7 +1501,7 @@ void FormFieldChoice::unselectAll ()
 
 void FormFieldChoice::deselectAll () {
   delete editedChoice;
-  editedChoice = NULL;
+  editedChoice = nullptr;
 
   unselectAll();
   updateSelection();
@@ -1510,7 +1510,7 @@ void FormFieldChoice::deselectAll () {
 void FormFieldChoice::toggle (int i)
 {
   delete editedChoice;
-  editedChoice = NULL;
+  editedChoice = nullptr;
 
   choices[i].selected = !choices[i].selected;
   updateSelection();
@@ -1519,7 +1519,7 @@ void FormFieldChoice::toggle (int i)
 void FormFieldChoice::select (int i)
 {
   delete editedChoice;
-  editedChoice = NULL;
+  editedChoice = nullptr;
 
   if (!multiselect)
     unselectAll();
@@ -1531,7 +1531,7 @@ void FormFieldChoice::select (int i)
 void FormFieldChoice::setEditChoice (GooString* new_content)
 {
   delete editedChoice;
-  editedChoice = NULL;
+  editedChoice = nullptr;
 
   unselectAll();
 
@@ -1570,7 +1570,7 @@ GooString *FormFieldChoice::getSelectedChoice() {
       return choices[i].optionName;
   }
 
-  return NULL;
+  return nullptr;
 }
 
 //------------------------------------------------------------------------
@@ -1581,7 +1581,7 @@ FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& re
     signature_type(adbe_pkcs7_detached),
     signature(nullptr), signature_info(nullptr)
 {
-  signature = NULL;
+  signature = nullptr;
 
   signature_info = new SignatureInfo();
   parseInfo();
@@ -1677,7 +1677,7 @@ SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool for
     return signature_info;
   }
 
-  if (signature == NULL) {
+  if (signature == nullptr) {
     error(errSyntaxError, 0, "Invalid or missing Signature string");
     return signature_info;
   }
@@ -1766,10 +1766,10 @@ Form::Form(PDFDoc *docA, Object* acroFormA)
   
   size = 0;
   numFields = 0;
-  rootFields = NULL;
+  rootFields = nullptr;
   quadding = quaddingLeftJustified;
-  defaultAppearance = NULL;
-  defaultResources = NULL;
+  defaultAppearance = nullptr;
+  defaultResources = nullptr;
 
   obj1 = acroForm->dictLookup("NeedAppearances");
   needAppearances = (obj1.isBool() && obj1.getBool());
@@ -1787,7 +1787,7 @@ Form::Form(PDFDoc *docA, Object* acroFormA)
     // At a minimum, this dictionary shall contain a Font entry
     obj1 = resDict.dictLookup("Font");
     if (obj1.isDict())
-      defaultResources = new GfxResources(xref, resDict.getDict(), NULL);
+      defaultResources = new GfxResources(xref, resDict.getDict(), nullptr);
   }
   if (!defaultResources) {
     resDict.setToNull();
@@ -1815,7 +1815,7 @@ Form::Form(PDFDoc *docA, Object* acroFormA)
       }
 
       std::set<int> usedParents;
-      rootFields[numFields++] = createFieldFromDict (&obj2, doc, oref.getRef(), NULL, &usedParents);
+      rootFields[numFields++] = createFieldFromDict (&obj2, doc, oref.getRef(), nullptr, &usedParents);
 
     }
   } else {
@@ -1918,7 +1918,7 @@ FormWidget* Form::findWidgetByRef (Ref aref)
     FormWidget *result = rootFields[i]->findWidgetByRef(aref);
     if(result) return result;
   }
-  return NULL;
+  return nullptr;
 }
 
 //------------------------------------------------------------------------
@@ -1928,7 +1928,7 @@ FormWidget* Form::findWidgetByRef (Ref aref)
 FormPageWidgets::FormPageWidgets (Annots *annots, unsigned int page, Form *form)
 {
   numWidgets = 0;
-  widgets = NULL;
+  widgets = nullptr;
 
   if (annots && annots->getNumAnnots() > 0 && form) {
     size = annots->getNumAnnots();
diff --git a/poppler/Function.cc b/poppler/Function.cc
index 92ba5f74..5437de35 100644
--- a/poppler/Function.cc
+++ b/poppler/Function.cc
@@ -76,7 +76,7 @@ Function *Function::parse(Object *funcObj, std::set<int> *usedParents) {
     return new IdentityFunction();
   } else {
     error(errSyntaxError, -1, "Expected function dictionary or stream");
-    return NULL;
+    return nullptr;
   }
 
   Object obj1 = dict->lookup("FunctionType");
@@ -96,11 +96,11 @@ Function *Function::parse(Object *funcObj, std::set<int> *usedParents) {
     func = new PostScriptFunction(funcObj, dict);
   } else {
     error(errSyntaxError, -1, "Unimplemented function type ({0:d})", funcType);
-    return NULL;
+    return nullptr;
   }
   if (!func->isOk()) {
     delete func;
-    return NULL;
+    return nullptr;
   }
 
   return func;
@@ -222,9 +222,9 @@ SampledFunction::SampledFunction(Object *funcObj, Dict *dict) {
   double in[funcMaxInputs];
   int i, j, t, bit, idx;
 
-  idxOffset = NULL;
-  samples = NULL;
-  sBuf = NULL;
+  idxOffset = nullptr;
+  samples = nullptr;
+  sBuf = nullptr;
   ok = gFalse;
 
   //----- initialize the generic stuff
@@ -651,10 +651,10 @@ StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict, std::set<int>
   int i;
 
   ok = gFalse;
-  funcs = NULL;
-  bounds = NULL;
-  encode = NULL;
-  scale = NULL;
+  funcs = nullptr;
+  bounds = nullptr;
+  encode = nullptr;
+  scale = nullptr;
 
   //----- initialize the generic stuff
   if (!init(dict)) {
@@ -677,7 +677,7 @@ StitchingFunction::StitchingFunction(Object *funcObj, Dict *dict, std::set<int>
   encode = (double *)gmallocn(2 * k, sizeof(double));
   scale = (double *)gmallocn(k, sizeof(double));
   for (i = 0; i < k; ++i) {
-    funcs[i] = NULL;
+    funcs[i] = nullptr;
   }
   for (i = 0; i < k; ++i) {
     std::set<int> usedParentsAux = *usedParents;
@@ -1131,8 +1131,8 @@ PostScriptFunction::PostScriptFunction(Object *funcObj, Dict *dict) {
   double in[funcMaxInputs];
   int i;
 
-  code = NULL;
-  codeString = NULL;
+  code = nullptr;
+  codeString = nullptr;
   codeSize = 0;
   ok = gFalse;
 
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 62b109a5..ee8f3193 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -327,7 +327,7 @@ GfxResources::GfxResources(XRef *xref, Dict *resDictA, GfxResources *nextA) :
 
     // build font dictionary
     Dict *resDict = resDictA->copy(xref);
-    fonts = NULL;
+    fonts = nullptr;
     obj1 = resDict->lookupNF("Font");
     if (obj1.isRef()) {
       obj2 = obj1.fetch(xref);
@@ -336,7 +336,7 @@ GfxResources::GfxResources(XRef *xref, Dict *resDictA, GfxResources *nextA) :
 	fonts = new GfxFontDict(xref, &r, obj2.getDict());
       }
     } else if (obj1.isDict()) {
-      fonts = new GfxFontDict(xref, NULL, obj1.getDict());
+      fonts = new GfxFontDict(xref, nullptr, obj1.getDict());
     }
 
     // get XObject dictionary
@@ -359,7 +359,7 @@ GfxResources::GfxResources(XRef *xref, Dict *resDictA, GfxResources *nextA) :
 
     delete resDict;
   } else {
-    fonts = NULL;
+    fonts = nullptr;
     xObjDict.setToNull();
     colorSpaceDict.setToNull();
     patternDict.setToNull();
@@ -386,7 +386,7 @@ GfxFont *GfxResources::lookupFont(char *name) {
     }
   }
   error(errSyntaxError, -1, "Unknown font tag '{0:s}'", name);
-  return NULL;
+  return nullptr;
 }
 
 Object GfxResources::lookupXObject(char *name) {
@@ -465,7 +465,7 @@ GfxPattern *GfxResources::lookupPattern(char *name, OutputDev *out, GfxState *st
     }
   }
   error(errSyntaxError, -1, "Unknown pattern '{0:s}'", name);
-  return NULL;
+  return nullptr;
 }
 
 GfxShading *GfxResources::lookupShading(char *name, OutputDev *out, GfxState *state) {
@@ -482,7 +482,7 @@ GfxShading *GfxResources::lookupShading(char *name, OutputDev *out, GfxState *st
     }
   }
   error(errSyntaxError, -1, "ExtGState '{0:s}' is unknown", name);
-  return NULL;
+  return nullptr;
 }
 
 Object GfxResources::lookupGState(char *name) {
@@ -530,16 +530,16 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict,
   int i;
 
   doc = docA;
-  xref = (xrefA == NULL) ? doc->getXRef() : xrefA;
+  xref = (xrefA == nullptr) ? doc->getXRef() : xrefA;
   catalog = doc->getCatalog();
   subPage = gFalse;
   printCommands = globalParams->getPrintCommands();
   profileCommands = globalParams->getProfileCommands();
-  mcStack = NULL;
-  parser = NULL;
+  mcStack = nullptr;
+  parser = nullptr;
 
   // start the resource stack
-  res = new GfxResources(xref, resDict, NULL);
+  res = new GfxResources(xref, resDict, nullptr);
 
   // initialize
   out = outA;
@@ -557,7 +557,7 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict,
   }
   formDepth = 0;
   ocState = gTrue;
-  parser = NULL;
+  parser = nullptr;
   abortCheckCbk = abortCheckCbkA;
   abortCheckCbkData = abortCheckCbkDataA;
 
@@ -585,16 +585,16 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict,
   int i;
 
   doc = docA;
-  xref = (xrefA == NULL) ? doc->getXRef() : xrefA;
+  xref = (xrefA == nullptr) ? doc->getXRef() : xrefA;
   catalog = doc->getCatalog();
   subPage = gTrue;
   printCommands = globalParams->getPrintCommands();
   profileCommands = globalParams->getProfileCommands();
-  mcStack = NULL;
-  parser = NULL;
+  mcStack = nullptr;
+  parser = nullptr;
 
   // start the resource stack
-  res = new GfxResources(xref, resDict, NULL);
+  res = new GfxResources(xref, resDict, nullptr);
 
   // initialize
   out = outA;
@@ -609,7 +609,7 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict,
   }
   formDepth = 0;
   ocState = gTrue;
-  parser = NULL;
+  parser = nullptr;
   abortCheckCbk = abortCheckCbkA;
   abortCheckCbkData = abortCheckCbkDataA;
 
@@ -646,7 +646,7 @@ void Gfx::initDisplayProfile() {
                 int length = 0;
                 Guchar *profBuf = iccStream->toUnsignedChars(&length, 65536, 65536);
                 cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,length);
-                if (hp == 0) {
+                if (hp == nullptr) {
                   error(errSyntaxWarning, -1, "read ICCBased color space profile error");
                 } else {
                   state->setDisplayProfile(hp);
@@ -699,7 +699,7 @@ void Gfx::display(Object *obj, GBool topLevel) {
   parser = new Parser(xref, new Lexer(xref, obj), gFalse);
   go(topLevel);
   delete parser;
-  parser = NULL;
+  parser = nullptr;
 }
 
 void Gfx::go(GBool topLevel) {
@@ -748,7 +748,7 @@ void Gfx::go(GBool topLevel) {
 
 	  cmd_g = new GooString (obj.getCmd());
 	  data_p = (ProfileData *)hash->lookup (cmd_g);
-	  if (data_p == NULL) {
+	  if (data_p == nullptr) {
 	    data_p = new ProfileData();
 	    hash->add (cmd_g, data_p);
 	  }
@@ -893,7 +893,7 @@ Operator *Gfx::findOp(char *name) {
       a = b = m;
   }
   if (cmp != 0)
-    return NULL;
+    return nullptr;
   return &opTab[a];
 }
 
@@ -947,7 +947,7 @@ void Gfx::opSetDash(Object args[], int numArgs) {
   a = args[0].getArray();
   length = a->getLength();
   if (length == 0) {
-    dash = NULL;
+    dash = nullptr;
   } else {
     dash = (double *)gmallocn(length, sizeof(double));
     for (i = 0; i < length; ++i) {
@@ -1115,7 +1115,7 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
   }
   if (obj2.isName("Default") ||
       obj2.isName("Identity")) {
-    funcs[0] = funcs[1] = funcs[2] = funcs[3] = NULL;
+    funcs[0] = funcs[1] = funcs[2] = funcs[3] = nullptr;
     state->setTransfer(funcs);
     out->updateTransfer(state);
   } else if (obj2.isArray() && obj2.arrayGetLength() == 4) {
@@ -1132,7 +1132,7 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
     }
   } else if (obj2.isName() || obj2.isDict() || obj2.isStream()) {
     if ((funcs[0] = Function::parse(&obj2))) {
-      funcs[1] = funcs[2] = funcs[3] = NULL;
+      funcs[1] = funcs[2] = funcs[3] = nullptr;
       state->setTransfer(funcs);
       out->updateTransfer(state);
     }
@@ -1166,21 +1166,21 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
       } else { // "Luminosity"
 	alpha = gFalse;
       }
-      funcs[0] = NULL;
+      funcs[0] = nullptr;
       obj3 = obj2.dictLookup("TR");
       if (!obj3.isNull()) {
 	if (obj3.isName("Default") ||
 	    obj3.isName("Identity")) {
-	  funcs[0] = NULL;
+	  funcs[0] = nullptr;
 	} else {
 	  funcs[0] = Function::parse(&obj3);
-	  if (funcs[0] == NULL ||
+	  if (funcs[0] == nullptr ||
 	    funcs[0]->getInputSize() != 1 ||
 	    funcs[0]->getOutputSize() != 1) {
 	      error(errSyntaxError, getPos(),
 		  "Invalid transfer function in soft mask in ExtGState");
 	      delete funcs[0];
-	      funcs[0] = NULL;
+	      funcs[0] = nullptr;
 	  }
 	}
       }
@@ -1200,7 +1200,7 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
       if (obj3.isStream()) {
 	Object obj4 = obj3.streamGetDict()->lookup("Group");
 	if (obj4.isDict()) {
-	  blendingColorSpace = NULL;
+	  blendingColorSpace = nullptr;
 	  isolated = knockout = gFalse;
 	  Object obj5 = obj4.dictLookup("CS");
 	  if (!obj5.isNull()) {
@@ -1352,7 +1352,7 @@ void Gfx::doSoftMask(Object *str, GBool alpha,
 
   // get resources
   obj1 = dict->lookup("Resources");
-  resDict = obj1.isDict() ? obj1.getDict() : (Dict *)NULL;
+  resDict = obj1.isDict() ? obj1.getDict() : (Dict *)nullptr;
 
   // draw it
   ++formDepth;
@@ -1376,14 +1376,14 @@ void Gfx::opSetRenderingIntent(Object args[], int numArgs) {
 
 void Gfx::opSetFillGray(Object args[], int numArgs) {
   GfxColor color;
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
 
-  state->setFillPattern(NULL);
+  state->setFillPattern(nullptr);
   Object obj = res->lookupColorSpace("DefaultGray");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceGrayColorSpace();
   }
   state->setFillColorSpace(colorSpace);
@@ -1395,14 +1395,14 @@ void Gfx::opSetFillGray(Object args[], int numArgs) {
 
 void Gfx::opSetStrokeGray(Object args[], int numArgs) {
   GfxColor color;
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
 
-  state->setStrokePattern(NULL);
+  state->setStrokePattern(nullptr);
   Object obj = res->lookupColorSpace("DefaultGray");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceGrayColorSpace();
   }
   state->setStrokeColorSpace(colorSpace);
@@ -1414,17 +1414,17 @@ void Gfx::opSetStrokeGray(Object args[], int numArgs) {
 
 void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
   GfxColor color;
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
   int i;
 
   Object obj = res->lookupColorSpace("DefaultCMYK");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceCMYKColorSpace();
   }
-  state->setFillPattern(NULL);
+  state->setFillPattern(nullptr);
   state->setFillColorSpace(colorSpace);
   out->updateFillColorSpace(state);
   for (i = 0; i < 4; ++i) {
@@ -1436,15 +1436,15 @@ void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
 
 void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) {
   GfxColor color;
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
   int i;
 
-  state->setStrokePattern(NULL);
+  state->setStrokePattern(nullptr);
   Object obj = res->lookupColorSpace("DefaultCMYK");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceCMYKColorSpace();
   }
   state->setStrokeColorSpace(colorSpace);
@@ -1457,16 +1457,16 @@ void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) {
 }
 
 void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
   GfxColor color;
   int i;
 
-  state->setFillPattern(NULL);
+  state->setFillPattern(nullptr);
   Object obj = res->lookupColorSpace("DefaultRGB");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceRGBColorSpace();
   }
   state->setFillColorSpace(colorSpace);
@@ -1479,16 +1479,16 @@ void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
 }
 
 void Gfx::opSetStrokeRGBColor(Object args[], int numArgs) {
-  GfxColorSpace *colorSpace = NULL;
+  GfxColorSpace *colorSpace = nullptr;
   GfxColor color;
   int i;
 
-  state->setStrokePattern(NULL);
+  state->setStrokePattern(nullptr);
   Object obj = res->lookupColorSpace("DefaultRGB");
   if (!obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
-  if (colorSpace == NULL) {
+  if (colorSpace == nullptr) {
     colorSpace = new GfxDeviceRGBColorSpace();
   }
   state->setStrokeColorSpace(colorSpace);
@@ -1511,7 +1511,7 @@ void Gfx::opSetFillColorSpace(Object args[], int numArgs) {
     colorSpace = GfxColorSpace::parse(res, &obj, out, state);
   }
   if (colorSpace) {
-    state->setFillPattern(NULL);
+    state->setFillPattern(nullptr);
     state->setFillColorSpace(colorSpace);
     out->updateFillColorSpace(state);
     colorSpace->getDefaultColor(&color);
@@ -1526,7 +1526,7 @@ void Gfx::opSetStrokeColorSpace(Object args[], int numArgs) {
   GfxColorSpace *colorSpace;
   GfxColor color;
 
-  state->setStrokePattern(NULL);
+  state->setStrokePattern(nullptr);
   Object obj = res->lookupColorSpace(args[0].getName());
   if (obj.isNull()) {
     colorSpace = GfxColorSpace::parse(res, &args[0], out, state);
@@ -1552,7 +1552,7 @@ void Gfx::opSetFillColor(Object args[], int numArgs) {
     error(errSyntaxError, getPos(), "Incorrect number of arguments in 'sc' command");
     return;
   }
-  state->setFillPattern(NULL);
+  state->setFillPattern(nullptr);
   for (i = 0; i < numArgs; ++i) {
     color.c[i] = dblToCol(args[i].getNum());
   }
@@ -1568,7 +1568,7 @@ void Gfx::opSetStrokeColor(Object args[], int numArgs) {
     error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SC' command");
     return;
   }
-  state->setStrokePattern(NULL);
+  state->setStrokePattern(nullptr);
   for (i = 0; i < numArgs; ++i) {
     color.c[i] = dblToCol(args[i].getNum());
   }
@@ -1611,7 +1611,7 @@ void Gfx::opSetFillColorN(Object args[], int numArgs) {
       error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command");
       return;
     }
-    state->setFillPattern(NULL);
+    state->setFillPattern(nullptr);
     for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
       if (args[i].isNum()) {
 	color.c[i] = dblToCol(args[i].getNum());
@@ -1662,7 +1662,7 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
       error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command");
       return;
     }
-    state->setStrokePattern(NULL);
+    state->setStrokePattern(nullptr);
     for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
       if (args[i].isNum()) {
 	color.c[i] = dblToCol(args[i].getNum());
@@ -2099,8 +2099,8 @@ void Gfx::doTilingPatternFill(GfxTilingPattern *tPat,
   // set underlying color space (for uncolored tiling patterns); set
   // various other parameters (stroke color, line width) to match
   // Adobe's behavior
-  state->setFillPattern(NULL);
-  state->setStrokePattern(NULL);
+  state->setFillPattern(nullptr);
+  state->setStrokePattern(nullptr);
   if (tPat->getPaintType() == 2 && (cs = patCS->getUnder())) {
     state->setFillColorSpace(cs->copy());
     out->updateFillColorSpace(state);
@@ -3665,7 +3665,7 @@ void Gfx::opSetFont(Object args[], int numArgs) {
   if (!(font = res->lookupFont(args[0].getName()))) {
     // unsetting the font (drawing no text) is better than using the
     // previous one and drawing random glyphs from it
-    state->setFont(NULL, args[1].getNum());
+    state->setFont(nullptr, args[1].getNum());
     fontChanged = gTrue;
     return;
   }
@@ -3875,7 +3875,7 @@ void Gfx::doShowText(GooString *s) {
   int wMode;
   double riseX, riseY;
   CharCode code;
-  Unicode *u = NULL;
+  Unicode *u = nullptr;
   double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, ddx, ddy;
   double originX, originY, tOriginX, tOriginY;
   double x0, y0, x1, y1;
@@ -4186,7 +4186,7 @@ void Gfx::opXObject(Object args[], int numArgs) {
   } else if (obj2.isName("PS")) {
     Object obj3 = obj1.streamGetDict()->lookup("Level1");
     out->psXObject(obj1.getStream(),
-		   obj3.isStream() ? obj3.getStream() : (Stream *)NULL);
+		   obj3.isStream() ? obj3.getStream() : (Stream *)nullptr);
   } else if (obj2.isName()) {
     error(errSyntaxError, getPos(), "Unknown XObject subtype '{0:s}'", obj2.getName());
   } else {
@@ -4351,11 +4351,11 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
       }
     }
     if (!obj1.isNull()) {
-      char *tempIntent = NULL;
+      char *tempIntent = nullptr;
       Object objIntent = dict->lookup("Intent");
       if (objIntent.isName()) {
         tempIntent = state->getRenderingIntent();
-        if (tempIntent != NULL) {
+        if (tempIntent != nullptr) {
           tempIntent = strdup(tempIntent);
         }
         state->setRenderingIntent(objIntent.getName());
@@ -4387,7 +4387,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
         colorSpace = GfxColorSpace::parse(res, &objCS, out, state);
       }
     } else {
-      colorSpace = NULL;
+      colorSpace = nullptr;
     }
     if (!colorSpace) {
       goto err1;
@@ -4403,7 +4403,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
 
     // get the mask
     haveColorKeyMask = haveExplicitMask = haveSoftMask = gFalse;
-    maskStr = NULL; // make gcc happy
+    maskStr = nullptr; // make gcc happy
     maskWidth = maskHeight = 0; // make gcc happy
     maskInvert = gFalse; // make gcc happy
     std::unique_ptr<GfxImageColorMap> maskColorMap;
@@ -4458,7 +4458,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
 	  obj1 = std::move(obj2);
 	}
       }
-      maskColorSpace = GfxColorSpace::parse(NULL, &obj1, out, state);
+      maskColorSpace = GfxColorSpace::parse(nullptr, &obj1, out, state);
       if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
 	goto err1;
       }
@@ -4589,7 +4589,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
 			     maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
       } else {
 	out->drawImage(state, ref, str, width, height, &colorMap, interpolate,
-		       haveColorKeyMask ? maskColors : (int *)NULL, inlineImg);
+		       haveColorKeyMask ? maskColors : (int *)nullptr, inlineImg);
       }
     }
   }
@@ -4611,7 +4611,7 @@ GBool Gfx::checkTransparencyGroup(Dict *resDict) {
   GBool transpGroup = gFalse;
   double opac;
 
-  if (resDict == NULL)
+  if (resDict == nullptr)
     return gFalse;
   pushResources(resDict);
   Object extGStates = resDict->lookup("ExtGState");
@@ -4732,11 +4732,11 @@ void Gfx::doForm(Object *str) {
 
   // get resources
   Object resObj = dict->lookup("Resources");
-  resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+  resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr;
 
   // check for a transparency group
   transpGroup = isolated = knockout = gFalse;
-  blendingColorSpace = NULL;
+  blendingColorSpace = nullptr;
   obj1 = dict->lookup("Group");
   if (obj1.isDict()) {
     Object obj2 = obj1.dictLookup("S");
@@ -4892,7 +4892,7 @@ void Gfx::opBeginImage(Object args[], int numArgs) {
 
   // display the image
   if (str) {
-    doImage(NULL, str, gTrue);
+    doImage(nullptr, str, gTrue);
   
     // skip 'EI' tag
     c1 = str->getUndecodedStream()->getChar();
@@ -4928,7 +4928,7 @@ Stream *Gfx::buildImageStream() {
   }
   if (obj.isEOF()) {
     error(errSyntaxError, getPos(), "End of file in inline image");
-    return NULL;
+    return nullptr;
   }
 
   // make stream
@@ -4936,7 +4936,7 @@ Stream *Gfx::buildImageStream() {
     str = new EmbedStream(parser->getStream(), std::move(dict), gFalse, 0, gTrue);
     str = str->addFilters(str->getDict());
   } else {
-    str = NULL;
+    str = nullptr;
   }
 
   return str;
@@ -5062,7 +5062,7 @@ void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
   if (numArgs == 2 && args[1].isDict()) {
     out->beginMarkedContent(args[0].getName(), args[1].getDict());
   } else if(numArgs == 1) {
-    out->beginMarkedContent(args[0].getName(), NULL);
+    out->beginMarkedContent(args[0].getName(), nullptr);
   }
 }
 
@@ -5276,7 +5276,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
 
     // get the resources
     Object resObj = dict->lookup("Resources");
-    resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+    resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr;
 
     // draw it
     drawForm(str, resDict, m, bbox);
@@ -5285,7 +5285,7 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor,
   // draw the border
   if (border && border->getWidth() > 0) {
     if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) {
-      state->setStrokePattern(NULL);
+      state->setStrokePattern(nullptr);
       state->setStrokeColorSpace(new GfxDeviceRGBColorSpace());
       out->updateStrokeColorSpace(state);
     }
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index d06eadff..58587a85 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -186,9 +186,9 @@ static int readFromStream(void *data) {
 //------------------------------------------------------------------------
 
 GfxFontLoc::GfxFontLoc() {
-  path = NULL;
+  path = nullptr;
   fontNum = 0;
-  encoding = NULL;
+  encoding = nullptr;
   substIdx = -1;
 }
 
@@ -212,7 +212,7 @@ GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict
   GfxFont *font;
 
   // get base font name
-  nameA = NULL;
+  nameA = nullptr;
   Object obj1 = fontDict->lookup("BaseFont");
   if (obj1.isName()) {
     nameA = new GooString(obj1.getName());
@@ -222,7 +222,7 @@ GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict
   typeA = getFontType(xref, fontDict, &embFontIDA);
 
   // create the font object
-  font = NULL;
+  font = nullptr;
   if (typeA < fontCIDType0) {
     font = new Gfx8BitFont(xref, tagA, idA, nameA, typeA, embFontIDA,
 			   fontDict);
@@ -242,8 +242,8 @@ GfxFont::GfxFont(const char *tagA, Ref idA, GooString *nameA,
   name = nameA;
   type = typeA;
   embFontID = embFontIDA;
-  embFontName = NULL;
-  family = NULL;
+  embFontName = nullptr;
+  family = nullptr;
   stretch = StretchNotDefined;
   weight = WeightNotDefined;
   refCnt = 1;
@@ -480,7 +480,7 @@ void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) {
     if (obj2.isName()) {
       embFontName = new GooString(obj2.getName());
     }
-    if (embFontName == NULL) {
+    if (embFontName == nullptr) {
       // get name with typo
       obj2 = obj1.dictLookup("Fontname");
       if (obj2.isName()) {
@@ -575,7 +575,7 @@ CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits,
 
   Object obj1 = fontDict->lookup("ToUnicode");
   if (!obj1.isStream()) {
-    return NULL;
+    return nullptr;
   }
   buf = new GooString();
   obj1.getStream()->fillGooString(buf);
@@ -598,7 +598,7 @@ GfxFontLoc *GfxFont::locateFont(XRef *xref, PSOutputDev *ps) {
   GBool embed;
 
   if (type == fontType3) {
-    return NULL;
+    return nullptr;
   }
 
   //----- embedded font
@@ -753,11 +753,11 @@ GfxFontLoc *GfxFont::locateFont(XRef *xref, PSOutputDev *ps) {
     }
 
     // failed to find a substitute font
-    return NULL;
+    return nullptr;
   }
 
   // failed to find a substitute font
-  return NULL;
+  return nullptr;
 }
 
 GfxFontLoc *GfxFont::locateBase14Font(GooString *base14Name) {
@@ -765,7 +765,7 @@ GfxFontLoc *GfxFont::locateBase14Font(GooString *base14Name) {
 
   path = globalParams->findFontFile(base14Name);
   if (!path) {
-    return NULL;
+    return nullptr;
   }
   return getExternalFont(path, gFalse);
 }
@@ -807,7 +807,7 @@ GfxFontLoc *GfxFont::getExternalFont(GooString *path, GBool cid) {
       (cid ? (fontType < fontCIDType0)
            : (fontType >= fontCIDType0))) {
     delete path;
-    return NULL;
+    return nullptr;
   }
   fontLoc = new GfxFontLoc();
   fontLoc->locType = gfxFontLocExternal;
@@ -826,7 +826,7 @@ char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
     error(errSyntaxError, -1, "Embedded font file is not a stream");
     embFontID.num = -1;
     *len = 0;
-    return NULL;
+    return nullptr;
   }
   str = obj2.getStream();
 
@@ -849,7 +849,7 @@ static const AlternateNameMap alternateNameMap[] =
   { "ff", "f_f" },
   { "ffi", "f_f_i" },
   { "ffl", "f_f_l" },
-  { 0,    0 }
+  { nullptr,    nullptr }
 };
 
 const char *GfxFont::getAlternateName(const char *name) {
@@ -860,7 +860,7 @@ const char *GfxFont::getAlternateName(const char *name) {
     }
     map++;
   }
-  return 0;
+  return nullptr;
 }
 
 //------------------------------------------------------------------------
@@ -933,7 +933,7 @@ static GBool testForNumericNames(Dict *fontDict, GBool hex) {
 	numeric = gFalse;
     } else if (obj.isName()) {
       // All character names must sucessfully parse.
-      if (!parseNumericName(obj.getName(), hex, NULL))
+      if (!parseNumericName(obj.getName(), hex, nullptr))
 	numeric = gFalse;
     } else {
       numeric = gFalse;
@@ -968,11 +968,11 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
   int n, i, a, b, m;
 
   refCnt = 1;
-  ctu = NULL;
+  ctu = nullptr;
 
   // do font name substitution for various aliases of the Base 14 font
   // names
-  base14 = NULL;
+  base14 = nullptr;
   if (name) {
     name2 = name->copy();
     i = 0;
@@ -1001,7 +1001,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
   }
 
   // is it a built-in font?
-  builtinFont = NULL;
+  builtinFont = nullptr;
   if (base14) {
     for (i = 0; i < nBuiltinFonts; ++i) {
       if (!strcmp(base14->base14Name, builtinFonts[i].name)) {
@@ -1092,7 +1092,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
   // check FontDict for base encoding
   hasEncoding = gFalse;
   usesMacRomanEnc = gFalse;
-  baseEnc = NULL;
+  baseEnc = nullptr;
   baseEncFromFontFile = gFalse;
   obj1 = fontDict->lookup("Encoding");
   if (obj1.isDict()) {
@@ -1123,9 +1123,9 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
   // check embedded font file for base encoding
   // (only for Type 1 fonts - trying to get an encoding out of a
   // TrueType font is a losing proposition)
-  ffT1 = NULL;
-  ffT1C = NULL;
-  buf = NULL;
+  ffT1 = nullptr;
+  ffT1C = nullptr;
+  buf = nullptr;
   if (type == fontType1 && embFontID.num >= 0) {
     if ((buf = readEmbFontFile(xref, &len))) {
       if ((ffT1 = FoFiType1::make(buf, len))) {
@@ -1288,7 +1288,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA
   // block (eg "fi", "ffi") to normal form
   for (code = 0; code < 256; ++code) {
     if (unicodeIsAlphabeticPresentationForm(toUnicode[code])) {
-      Unicode *normalized = unicodeNormalizeNFKC(&toUnicode[code], 1, &len, NULL);
+      Unicode *normalized = unicodeNormalizeNFKC(&toUnicode[code], 1, &len, nullptr);
       if (len > 1)
         ctu->setMapping((CharCode)code, normalized, len);
       gfree(normalized);
@@ -1458,7 +1458,7 @@ static int parseCharName(char *charName, Unicode *uBuf, int uLen,
     char *var_part = strchr(charName, '.');
     if (var_part == charName) {
       return 0;	// .notdef or similar
-    } else if (var_part != NULL) {
+    } else if (var_part != nullptr) {
       // parse names of the form 7.oldstyle, P.swash, s.sc, etc.
       char *main_part = gstrndup(charName, var_part - charName);
       GBool namesRecurse = gTrue, variantsRecurse = gFalse;
@@ -1696,7 +1696,7 @@ int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
 }
 
 Dict *Gfx8BitFont::getCharProcs() {
-  return charProcs.isDict() ? charProcs.getDict() : (Dict *)NULL;
+  return charProcs.isDict() ? charProcs.getDict() : (Dict *)nullptr;
 }
 
 Object Gfx8BitFont::getCharProc(int code) {
@@ -1716,7 +1716,7 @@ Object Gfx8BitFont::getCharProcNF(int code) {
 }
 
 Dict *Gfx8BitFont::getResources() {
-  return resources.isDict() ? resources.getDict() : (Dict *)NULL;
+  return resources.isDict() ? resources.getDict() : (Dict *)nullptr;
 }
 
 //------------------------------------------------------------------------
@@ -1754,18 +1754,18 @@ GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA,
   ascent = 0.95;
   descent = -0.35;
   fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
-  collection = NULL;
-  cMap = NULL;
-  ctu = NULL;
+  collection = nullptr;
+  cMap = nullptr;
+  ctu = nullptr;
   ctuUsesCharCode = gTrue;
   widths.defWidth = 1.0;
   widths.defHeight = -1.0;
   widths.defVY = 0.880;
-  widths.exceps = NULL;
+  widths.exceps = nullptr;
   widths.nExceps = 0;
-  widths.excepsV = NULL;
+  widths.excepsV = nullptr;
   widths.nExcepsV = 0;
-  cidToGID = NULL;
+  cidToGID = nullptr;
   cidToGIDLen = 0;
 
   // get the descendant font
@@ -1801,7 +1801,7 @@ GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA,
   collection = obj2.getString()->copy()->append('-')->append(obj3.getString());
 
   // look for a ToUnicode CMap
-  if (!(ctu = readToUnicodeCMap(fontDict, 16, NULL))) {
+  if (!(ctu = readToUnicodeCMap(fontDict, 16, nullptr))) {
     ctuUsesCharCode = gFalse;
 
     // use an identity mapping for the "Adobe-Identity" and
@@ -1862,7 +1862,7 @@ GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA,
     error(errSyntaxError, -1, "Missing Encoding entry in Type 0 font");
     return;
   }
-  if (!(cMap = CMap::parse(NULL, collection, &obj1))) {
+  if (!(cMap = CMap::parse(nullptr, collection, &obj1))) {
     return;
   }
   if (cMap->getCMapName()) {
@@ -2133,7 +2133,7 @@ CharCodeToUnicode *GfxCIDFont::getToUnicode() {
 }
 
 GooString *GfxCIDFont::getCollection() {
-  return cMap ? cMap->getCollection() : (GooString *)NULL;
+  return cMap ? cMap->getCollection() : (GooString *)nullptr;
 }
 
 int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi,
@@ -2159,35 +2159,35 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
     "UniCNS-UCS2-V",
     "UniCNS-UTF32-H",
     "UniCNS-UCS2-H",
-    0
+    nullptr
   };
   static const char *adobe_gb1_cmaps[] = {
     "UniGB-UTF32-V",
     "UniGB-UCS2-V",
     "UniGB-UTF32-H",
     "UniGB-UCS2-H",
-    0
+    nullptr
   };
   static const char *adobe_japan1_cmaps[] = {
     "UniJIS-UTF32-V",
     "UniJIS-UCS2-V",
     "UniJIS-UTF32-H",
     "UniJIS-UCS2-H",
-    0
+    nullptr
   };
   static const char *adobe_japan2_cmaps[] = {
     "UniHojo-UTF32-V",
     "UniHojo-UCS2-V",
     "UniHojo-UTF32-H",
     "UniHojo-UCS2-H",
-    0
+    nullptr
   };
   static const char *adobe_korea1_cmaps[] = {
     "UniKS-UTF32-V",
     "UniKS-UCS2-V",
     "UniKS-UTF32-H",
     "UniKS-UCS2-H",
-    0
+    nullptr
   };
   static struct CMapListEntry {
     const char *collection;
@@ -2226,12 +2226,12 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
       "Adobe-Korea1-UCS2",
       adobe_korea1_cmaps,
     },
-    {0, 0, 0, 0}
+    {nullptr, nullptr, nullptr, nullptr}
   };
-  Unicode *humap = 0;
-  Unicode *vumap = 0;
-  Unicode *tumap = 0;
-  int *codeToGID = 0;
+  Unicode *humap = nullptr;
+  Unicode *vumap = nullptr;
+  Unicode *tumap = nullptr;
+  int *codeToGID = nullptr;
   unsigned long n;
   int i;
   unsigned long code;
@@ -2244,8 +2244,8 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
   Ref embID;
 
   *mapsizep = 0;
-  if (!ctu || !getCollection()) return NULL;
-  if (getCollection()->cmp("Adobe-Identity") == 0) return NULL;
+  if (!ctu || !getCollection()) return nullptr;
+  if (getCollection()->cmp("Adobe-Identity") == 0) return nullptr;
   if (getEmbeddedFontID(&embID)) {
    /* if this font is embedded font, 
     * CIDToGIDMap should be embedded in PDF file
@@ -2273,10 +2273,10 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
     }
   }
   if (cmap < 0)
-    return NULL;
+    return nullptr;
 
   wmode = getWMode();
-  for (lp = CMapList;lp->collection != 0;lp++) {
+  for (lp = CMapList;lp->collection != nullptr;lp++) {
     if (strcmp(lp->collection,getCollection()->getCString()) == 0) {
       break;
     }
@@ -2285,11 +2285,11 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
   tumap = new Unicode[n];
   humap = new Unicode[n*N_UCS_CANDIDATES];
   memset(humap,0,sizeof(Unicode)*n*N_UCS_CANDIDATES);
-  if (lp->collection != 0) {
+  if (lp->collection != nullptr) {
     CharCodeToUnicode *tctu;
     GooString tname(lp->toUnicodeMap);
 
-    if ((tctu = CharCodeToUnicode::parseCMapFromFile(&tname,16)) != 0) {
+    if ((tctu = CharCodeToUnicode::parseCMapFromFile(&tname,16)) != nullptr) {
       CharCode cid;
       for (cid = 0;cid < n ;cid++) {
 	int len;
@@ -2307,11 +2307,11 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
     }
     vumap = new Unicode[n];
     memset(vumap,0,sizeof(Unicode)*n);
-    for (cmapName = lp->CMaps;*cmapName != 0;cmapName++) {
+    for (cmapName = lp->CMaps;*cmapName != nullptr;cmapName++) {
       GooString cname(*cmapName);
 
       if ((cMap = globalParams->getCMap(getCollection(),&cname))
-	   != 0) {
+	   != nullptr) {
 	    if (cMap->getWMode()) {
 		cMap->setReverseMap(vumap,n,1);
 	    } else {
@@ -2324,7 +2324,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
   } else {
     error(errSyntaxError, -1, "Unknown character collection {0:t}\n",
       getCollection());
-    if ((ctu = getToUnicode()) != 0) {
+    if ((ctu = getToUnicode()) != nullptr) {
       CharCode cid;
       for (cid = 0;cid < n ;cid++) {
 	Unicode *ucode;
@@ -2348,24 +2348,24 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
 
     unicode = 0;
     gid = 0;
-    if (humap != 0) {
+    if (humap != nullptr) {
       for (i = 0;i < N_UCS_CANDIDATES
 	&& gid == 0 && (unicode = humap[code*N_UCS_CANDIDATES+i]) != 0;i++) {
 	gid = mapCodeToGID(ff,cmap,unicode,gFalse);
       }
     }
-    if (gid == 0 && vumap != 0) {
+    if (gid == 0 && vumap != nullptr) {
       unicode = vumap[code];
       if (unicode != 0) {
 	gid = mapCodeToGID(ff,cmap,unicode,gTrue);
-	if (gid == 0 && tumap != 0) {
+	if (gid == 0 && tumap != nullptr) {
 	  if ((unicode = tumap[code]) != 0) {
 	    gid = mapCodeToGID(ff,cmap,unicode,gTrue);
 	  }
 	}
       }
     }
-    if (gid == 0 && tumap != 0) {
+    if (gid == 0 && tumap != nullptr) {
       if ((unicode = tumap[code]) != 0) {
 	gid = mapCodeToGID(ff,cmap,unicode,gFalse);
       }
@@ -2374,7 +2374,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
       /* special handling space characters */
       const unsigned long *p;
 
-      if (humap != 0) unicode = humap[code];
+      if (humap != nullptr) unicode = humap[code];
       if (unicode != 0) {
 	/* check if code is space character , so map code to 0x0020 */
 	for (p = spaces;*p != 0;p++) {
@@ -2389,9 +2389,9 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
     codeToGID[code] = gid;
   }
   *mapsizep = n;
-  if (humap != 0) delete[] humap;
-  if (tumap != 0) delete[] tumap;
-  if (vumap != 0) delete[] vumap;
+  if (humap != nullptr) delete[] humap;
+  if (tumap != nullptr) delete[] tumap;
+  if (vumap != nullptr) delete[] vumap;
   return codeToGID;
 }
 
@@ -2462,11 +2462,11 @@ GfxFontDict::GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict) {
 	// we can tell the difference between a missing font
 	// and a font that is just !isOk()
 	fonts[i]->decRefCnt();
-	fonts[i] = NULL;
+	fonts[i] = nullptr;
       }
     } else {
       error(errSyntaxError, -1, "font resource is not a dictionary");
-      fonts[i] = NULL;
+      fonts[i] = nullptr;
     }
   }
 }
@@ -2490,5 +2490,5 @@ GfxFont *GfxFontDict::lookup(char *tag) {
       return fonts[i];
     }
   }
-  return NULL;
+  return nullptr;
 }
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 68224f86..7b241421 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -210,11 +210,11 @@ unsigned int GfxColorTransform::unref() {
   return --refCount;
 }
 
-static cmsHPROFILE RGBProfile = NULL;
-static GooString *displayProfileName = NULL; // display profile file Name
-static cmsHPROFILE displayProfile = NULL; // display profile
+static cmsHPROFILE RGBProfile = nullptr;
+static GooString *displayProfileName = nullptr; // display profile file Name
+static cmsHPROFILE displayProfile = nullptr; // display profile
 static unsigned int displayPixelType = 0;
-static GfxColorTransform *XYZ2DisplayTransform = NULL;
+static GfxColorTransform *XYZ2DisplayTransform = nullptr;
 
 // convert color space signature to cmsColor type 
 static unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs);
@@ -223,7 +223,7 @@ static cmsHPROFILE loadColorProfile(const char *fileName);
 
 void GfxColorSpace::setDisplayProfile(void *displayProfileA) {
   displayProfile = displayProfileA;
-  if (displayProfile != NULL) {
+  if (displayProfile != nullptr) {
     cmsHTRANSFORM transform;
     unsigned int nChannels;
 
@@ -235,7 +235,7 @@ void GfxColorSpace::setDisplayProfile(void *displayProfileA) {
 	   displayProfile,
 	   COLORSPACE_SH(displayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) {
+	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransform = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, displayPixelType);
@@ -264,7 +264,7 @@ cmsHPROFILE GfxColorSpace::getDisplayProfile() {
 
 GfxColorSpace::GfxColorSpace() {
   overprintMask = 0x0f;
-  mapping = NULL;
+  mapping = nullptr;
 }
 
 GfxColorSpace::~GfxColorSpace() {
@@ -276,80 +276,80 @@ GfxColorSpace *GfxColorSpace::parse(GfxResources *res, Object *csObj, OutputDev
 
   if (recursion > colorSpaceRecursionLimit) {
     error(errSyntaxError, -1, "Loop detected in color space objects");
-    return NULL;
+    return nullptr;
   }
 
-  cs = NULL;
+  cs = nullptr;
   if (csObj->isName()) {
     if (csObj->isName("DeviceGray") || csObj->isName("G")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultGray");
         if (objCS.isNull()) {
           cs = new GfxDeviceGrayColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceGrayColorSpace();
       }
     } else if (csObj->isName("DeviceRGB") || csObj->isName("RGB")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultRGB");
         if (objCS.isNull()) {
           cs = new GfxDeviceRGBColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceRGBColorSpace();
       }
     } else if (csObj->isName("DeviceCMYK") || csObj->isName("CMYK")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultCMYK");
         if (objCS.isNull()) {
           cs = new GfxDeviceCMYKColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceCMYKColorSpace();
       }
     } else if (csObj->isName("Pattern")) {
-      cs = new GfxPatternColorSpace(NULL);
+      cs = new GfxPatternColorSpace(nullptr);
     } else {
       error(errSyntaxWarning, -1, "Bad color space '{0:s}'", csObj->getName());
     }
   } else if (csObj->isArray() && csObj->arrayGetLength() > 0) {
     obj1 = csObj->arrayGet(0);
     if (obj1.isName("DeviceGray") || obj1.isName("G")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultGray");
         if (objCS.isNull()) {
           cs = new GfxDeviceGrayColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceGrayColorSpace();
       }
     } else if (obj1.isName("DeviceRGB") || obj1.isName("RGB")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultRGB");
         if (objCS.isNull()) {
           cs = new GfxDeviceRGBColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceRGBColorSpace();
       }
     } else if (obj1.isName("DeviceCMYK") || obj1.isName("CMYK")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultCMYK");
         if (objCS.isNull()) {
           cs = new GfxDeviceCMYKColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceCMYKColorSpace();
@@ -376,34 +376,34 @@ GfxColorSpace *GfxColorSpace::parse(GfxResources *res, Object *csObj, OutputDev
   } else if (csObj->isDict()) {
     obj1 = csObj->dictLookup("ColorSpace");
     if (obj1.isName("DeviceGray")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultGray");
         if (objCS.isNull()) {
           cs = new GfxDeviceGrayColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceGrayColorSpace();
       }
     } else if (obj1.isName("DeviceRGB")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultRGB");
         if (objCS.isNull()) {
           cs = new GfxDeviceRGBColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceRGBColorSpace();
       }
     } else if (obj1.isName("DeviceCMYK")) {
-      if (res != NULL) {
+      if (res != nullptr) {
         Object objCS = res->lookupColorSpace("DefaultCMYK");
         if (objCS.isNull()) {
           cs = new GfxDeviceCMYKColorSpace();
         } else {
-          cs = GfxColorSpace::parse(NULL, &objCS, out, state);
+          cs = GfxColorSpace::parse(nullptr, &objCS, out, state);
         }
       } else {
         cs = new GfxDeviceCMYKColorSpace();
@@ -442,13 +442,13 @@ const char *GfxColorSpace::getColorSpaceModeName(int idx) {
 #ifdef USE_CMS
 cmsHPROFILE loadColorProfile(const char *fileName)
 {
-  cmsHPROFILE hp = NULL;
+  cmsHPROFILE hp = nullptr;
   FILE *fp;
 
   if (fileName[0] == '/') {
     // full path
     // check if open the file
-    if ((fp = fopen(fileName,"r")) != NULL) {
+    if ((fp = fopen(fileName,"r")) != nullptr) {
       fclose(fp);
       hp = cmsOpenProfileFromFile(fileName,"r");
     }
@@ -458,7 +458,7 @@ cmsHPROFILE loadColorProfile(const char *fileName)
   GooString *path = new GooString(GLOBAL_COLOR_PROFILE_DIR);
   path->append(fileName);
   // check if open the file
-  if ((fp = fopen(path->getCString(),"r")) != NULL) {
+  if ((fp = fopen(path->getCString(),"r")) != nullptr) {
     fclose(fp);
     hp = cmsOpenProfileFromFile(path->getCString(),"r");
   }
@@ -484,9 +484,9 @@ int GfxColorSpace::setupColorProfiles()
   // set error handlor
   cmsSetLogErrorHandler(CMSError);
 
-  if (displayProfile == NULL) {
+  if (displayProfile == nullptr) {
     // load display profile if it was not already loaded.
-    if (displayProfileName == NULL) {
+    if (displayProfileName == nullptr) {
       displayProfile = loadColorProfile("display.icc");
     } else if (displayProfileName->getLength() > 0) {
       displayProfile = loadColorProfile(displayProfileName->getCString());
@@ -494,12 +494,12 @@ int GfxColorSpace::setupColorProfiles()
   }
   // load RGB profile
   RGBProfile = loadColorProfile("RGB.icc");
-  if (RGBProfile == NULL) {
+  if (RGBProfile == nullptr) {
     /* use built in sRGB profile */
     RGBProfile = cmsCreate_sRGBProfile();
   }
   // create transforms
-  if (displayProfile != NULL) {
+  if (displayProfile != nullptr) {
     displayPixelType = getCMSColorSpaceType(cmsGetColorSpace(displayProfile));
     nChannels = getCMSNChannels(cmsGetColorSpace(displayProfile));
     // create transform from XYZ
@@ -508,7 +508,7 @@ int GfxColorSpace::setupColorProfiles()
 	   displayProfile,
 	   COLORSPACE_SH(displayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) {
+	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransform = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, displayPixelType);
@@ -734,7 +734,7 @@ GfxCalGrayColorSpace::GfxCalGrayColorSpace() {
 
 GfxCalGrayColorSpace::~GfxCalGrayColorSpace() {
 #ifdef USE_CMS
-  if (transform != NULL) {
+  if (transform != nullptr) {
     if (transform->unref() == 0) delete transform;
   }
 #endif
@@ -756,7 +756,7 @@ GfxColorSpace *GfxCalGrayColorSpace::copy() {
   cs->kb = kb;
 #ifdef USE_CMS
   cs->transform = transform;
-  if (transform != NULL) transform->ref();
+  if (transform != nullptr) transform->ref();
 #endif
   return cs;
 }
@@ -776,7 +776,7 @@ GfxColorSpace *GfxCalGrayColorSpace::parse(Array *arr, GfxState *state) {
   obj1 = arr->get(1);
   if (!obj1.isDict()) {
     error(errSyntaxWarning, -1, "Bad CalGray color space");
-    return NULL;
+    return nullptr;
   }
   cs = new GfxCalGrayColorSpace();
   obj2 = obj1.dictLookup("WhitePoint");
@@ -818,8 +818,8 @@ GfxColorSpace *GfxCalGrayColorSpace::parse(Array *arr, GfxState *state) {
 		xyzrgb[2][1] * cs->whiteY +
 		xyzrgb[2][2] * cs->whiteZ);
 #ifdef USE_CMS
-  cs->transform = (state != NULL) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
-  if (cs->transform != NULL) cs->transform->ref();
+  cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
+  if (cs->transform != nullptr) cs->transform->ref();
 #endif
   return cs;
 }
@@ -839,7 +839,7 @@ void GfxCalGrayColorSpace::getGray(GfxColor *color, GfxGray *gray) {
   GfxRGB rgb;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_GRAY) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     double X, Y, Z;
@@ -865,7 +865,7 @@ void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 
   getXYZ(color,&X,&Y,&Z);
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_RGB) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     
@@ -896,7 +896,7 @@ void GfxCalGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
   GfxColorComp c, m, y, k;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     double in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     double X, Y, Z;
@@ -1105,7 +1105,7 @@ GfxCalRGBColorSpace::GfxCalRGBColorSpace() {
 
 GfxCalRGBColorSpace::~GfxCalRGBColorSpace() {
 #ifdef USE_CMS
-  if (transform != NULL) {
+  if (transform != nullptr) {
     if (transform->unref() == 0) delete transform;
   }
 #endif
@@ -1133,7 +1133,7 @@ GfxColorSpace *GfxCalRGBColorSpace::copy() {
   }
 #ifdef USE_CMS
   cs->transform = transform;
-  if (transform != NULL) transform->ref();
+  if (transform != nullptr) transform->ref();
 #endif
   return cs;
 }
@@ -1146,7 +1146,7 @@ GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr, GfxState *state) {
   obj1 = arr->get(1);
   if (!obj1.isDict()) {
     error(errSyntaxWarning, -1, "Bad CalRGB color space");
-    return NULL;
+    return nullptr;
   }
   cs = new GfxCalRGBColorSpace();
   obj2 = obj1.dictLookup("WhitePoint");
@@ -1205,8 +1205,8 @@ GfxColorSpace *GfxCalRGBColorSpace::parse(Array *arr, GfxState *state) {
 		xyzrgb[2][2] * cs->whiteZ);
 
 #ifdef USE_CMS
-  cs->transform = (state != NULL) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
-  if (cs->transform != NULL) cs->transform->ref();
+  cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
+  if (cs->transform != nullptr) cs->transform->ref();
 #endif
   return cs;
 }
@@ -1228,7 +1228,7 @@ void GfxCalRGBColorSpace::getGray(GfxColor *color, GfxGray *gray) {
   GfxRGB rgb;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_GRAY) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     double X, Y, Z;
@@ -1254,7 +1254,7 @@ void GfxCalRGBColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 
   getXYZ(color,&X,&Y,&Z);
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_RGB) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     
@@ -1282,7 +1282,7 @@ void GfxCalRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
   GfxColorComp c, m, y, k;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     double in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     double X, Y, Z;
@@ -1479,7 +1479,7 @@ GfxLabColorSpace::GfxLabColorSpace() {
 
 GfxLabColorSpace::~GfxLabColorSpace() {
 #ifdef USE_CMS
-  if (transform != NULL) {
+  if (transform != nullptr) {
     if (transform->unref() == 0) delete transform;
   }
 #endif
@@ -1504,7 +1504,7 @@ GfxColorSpace *GfxLabColorSpace::copy() {
   cs->kb = kb;
 #ifdef USE_CMS
   cs->transform = transform;
-  if (transform != NULL) transform->ref();
+  if (transform != nullptr) transform->ref();
 #endif
   return cs;
 }
@@ -1516,7 +1516,7 @@ GfxColorSpace *GfxLabColorSpace::parse(Array *arr, GfxState *state) {
   obj1 = arr->get(1);
   if (!obj1.isDict()) {
     error(errSyntaxWarning, -1, "Bad Lab color space");
-    return NULL;
+    return nullptr;
   }
   cs = new GfxLabColorSpace();
   bool ok = true;
@@ -1570,8 +1570,8 @@ GfxColorSpace *GfxLabColorSpace::parse(Array *arr, GfxState *state) {
 		xyzrgb[2][2] * cs->whiteZ);
 
 #ifdef USE_CMS
-  cs->transform = (state != NULL) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
-  if (cs->transform != NULL) cs->transform->ref();
+  cs->transform = (state != nullptr) ? state->getXYZ2DisplayTransform() : XYZ2DisplayTransform;
+  if (cs->transform != nullptr) cs->transform->ref();
 #endif
   return cs;
 }
@@ -1580,7 +1580,7 @@ void GfxLabColorSpace::getGray(GfxColor *color, GfxGray *gray) {
   GfxRGB rgb;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_GRAY) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     
@@ -1632,7 +1632,7 @@ void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 
   getXYZ(color, &X, &Y, &Z);
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_RGB) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     
@@ -1644,7 +1644,7 @@ void GfxLabColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
     rgb->g = byteToCol(out[1]);
     rgb->b = byteToCol(out[2]);
     return;
-  } else if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  } else if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     Guchar out[gfxColorMaxComps];
     double in[gfxColorMaxComps];
     double c, m, y, k, c1, m1, y1, k1, r, g, b;
@@ -1685,7 +1685,7 @@ void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
   GfxColorComp c, m, y, k;
 
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     double in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     
@@ -1798,18 +1798,18 @@ GfxICCBasedColorSpace::GfxICCBasedColorSpace(int nCompsA, GfxColorSpace *altA,
   rangeMin[0] = rangeMin[1] = rangeMin[2] = rangeMin[3] = 0;
   rangeMax[0] = rangeMax[1] = rangeMax[2] = rangeMax[3] = 1;
 #ifdef USE_CMS
-  transform = NULL;
-  lineTransform = NULL;
+  transform = nullptr;
+  lineTransform = nullptr;
 #endif
 }
 
 GfxICCBasedColorSpace::~GfxICCBasedColorSpace() {
   delete alt;
 #ifdef USE_CMS
-  if (transform != NULL) {
+  if (transform != nullptr) {
     if (transform->unref() == 0) delete transform;
   }
-  if (lineTransform != NULL) {
+  if (lineTransform != nullptr) {
     if (lineTransform->unref() == 0) delete lineTransform;
   }
 #endif
@@ -1826,9 +1826,9 @@ GfxColorSpace *GfxICCBasedColorSpace::copy() {
   }
 #ifdef USE_CMS
   cs->transform = transform;
-  if (transform != NULL) transform->ref();
+  if (transform != nullptr) transform->ref();
   cs->lineTransform = lineTransform;
-  if (lineTransform != NULL) lineTransform->ref();
+  if (lineTransform != nullptr) lineTransform->ref();
 #endif
   return cs;
 }
@@ -1844,7 +1844,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
 
   if (arr->getLength() < 2) {
     error(errSyntaxError, -1, "Bad ICCBased color space");
-    return NULL;
+    return nullptr;
   }
   obj1 = arr->getNF(1);
   if (obj1.isRef()) {
@@ -1858,14 +1858,14 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
   if (out && iccProfileStreamA.num > 0) {
     GfxICCBasedColorSpaceKey k(iccProfileStreamA.num, iccProfileStreamA.gen);
     GfxICCBasedColorSpaceItem *item = static_cast<GfxICCBasedColorSpaceItem *>(out->getIccColorSpaceCache()->lookup(k));
-    if (item != NULL)
+    if (item != nullptr)
     {
       cs = static_cast<GfxICCBasedColorSpace*>(item->cs->copy());
       int transformIntent = cs->getIntent();
       int cmsIntent = INTENT_RELATIVE_COLORIMETRIC;
-      if (state != NULL) {
+      if (state != nullptr) {
         const char *intent = state->getRenderingIntent();
-        if (intent != NULL) {
+        if (intent != nullptr) {
           if (strcmp(intent, "AbsoluteColorimetric") == 0) {
             cmsIntent = INTENT_ABSOLUTE_COLORIMETRIC;
           } else if (strcmp(intent, "Saturation") == 0) {
@@ -1885,7 +1885,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
   obj1 = arr->get(1);
   if (!obj1.isStream()) {
     error(errSyntaxWarning, -1, "Bad ICCBased color space (stream)");
-    return NULL;
+    return nullptr;
   }
   dict = obj1.streamGetDict();
   obj2 = dict->lookup("N");
@@ -1902,7 +1902,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
   }
   obj2 = dict->lookup("Alternate");
   if (obj2.isNull() ||
-      !(altA = GfxColorSpace::parse(NULL, &obj2, out, state, recursion + 1))) {
+      !(altA = GfxColorSpace::parse(nullptr, &obj2, out, state, recursion + 1))) {
     switch (nCompsA) {
     case 1:
       altA = new GfxDeviceGrayColorSpace();
@@ -1915,13 +1915,13 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
       break;
     default:
       error(errSyntaxWarning, -1, "Bad ICCBased color space - invalid N");
-      return NULL;
+      return nullptr;
     }
   }
   if (altA->getNComps() != nCompsA) {
       error(errSyntaxWarning, -1, "Bad ICCBased color space - N doesn't match alt color space");
       delete altA;
-      return NULL;
+      return nullptr;
   }
   cs = new GfxICCBasedColorSpace(nCompsA, altA, &iccProfileStreamA);
   obj2 = dict->lookup("Range");
@@ -1946,12 +1946,12 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
   profBuf = iccStream->toUnsignedChars(&length, 65536, 65536);
   cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,length);
   gfree(profBuf);
-  if (hp == 0) {
+  if (hp == nullptr) {
     error(errSyntaxWarning, -1, "read ICCBased color space profile error");
   } else {
-    cmsHPROFILE dhp = (state != NULL && state->getDisplayProfile() != NULL) ? state->getDisplayProfile() : displayProfile;
-    if (dhp == NULL) {
-      if (unlikely(RGBProfile == NULL)) {
+    cmsHPROFILE dhp = (state != nullptr && state->getDisplayProfile() != nullptr) ? state->getDisplayProfile() : displayProfile;
+    if (dhp == nullptr) {
+      if (unlikely(RGBProfile == nullptr)) {
         GfxColorSpace::setupColorProfiles();
       }
       dhp = RGBProfile;
@@ -1962,9 +1962,9 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
     cmsHTRANSFORM transform;
 
     int cmsIntent = INTENT_RELATIVE_COLORIMETRIC;
-    if (state != NULL) {
+    if (state != nullptr) {
       const char *intent = state->getRenderingIntent();
-      if (intent != NULL) {
+      if (intent != nullptr) {
         if (strcmp(intent, "AbsoluteColorimetric") == 0) {
           cmsIntent = INTENT_ABSOLUTE_COLORIMETRIC;
         } else if (strcmp(intent, "Saturation") == 0) {
@@ -1979,9 +1979,9 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
 	   dhp,
 	   COLORSPACE_SH(dcst) |
 	     CHANNELS_SH(dNChannels) | BYTES_SH(1),
-	   cmsIntent, LCMS_FLAGS)) == 0) {
+	   cmsIntent, LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create transform");
-      cs->transform = NULL;
+      cs->transform = nullptr;
     } else {
       cs->transform = new GfxColorTransform(transform, cmsIntent, cst, dcst);
     }
@@ -1989,9 +1989,9 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
        // create line transform only when the display is RGB type color space 
       if ((transform = cmsCreateTransform(hp,
 	    CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp,
-	    (dcst == PT_RGB) ? TYPE_RGB_8 : TYPE_CMYK_8, cmsIntent, LCMS_FLAGS)) == 0) {
+	    (dcst == PT_RGB) ? TYPE_RGB_8 : TYPE_CMYK_8, cmsIntent, LCMS_FLAGS)) == nullptr) {
 	error(errSyntaxWarning, -1, "Can't create transform");
-	cs->lineTransform = NULL;
+	cs->lineTransform = nullptr;
       } else {
 	cs->lineTransform = new GfxColorTransform(transform, cmsIntent, cst, dcst);
       }
@@ -2010,7 +2010,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
 
 void GfxICCBasedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
 #ifdef USE_CMS
-  if (transform != 0 && transform->getTransformPixelType() == PT_GRAY) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_GRAY) {
     Guchar in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     
@@ -2059,7 +2059,7 @@ void GfxICCBasedColorSpace::getGray(GfxColor *color, GfxGray *gray) {
 
 void GfxICCBasedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 #ifdef USE_CMS
-  if (transform != 0 && transform->getTransformPixelType() == PT_RGB) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_RGB) {
     Guchar in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     
@@ -2098,7 +2098,7 @@ void GfxICCBasedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
       unsigned int value = (out[0] << 16) + (out[1] << 8) + out[2];
       cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value));
     }
-  } else if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  } else if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     Guchar in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     double c, m, y, k, c1, m1, y1, k1, r, g, b;
@@ -2158,7 +2158,7 @@ void GfxICCBasedColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
 void GfxICCBasedColorSpace::getRGBLine(Guchar *in, unsigned int *out,
 				       int length) {
 #ifdef USE_CMS
-  if (lineTransform != 0 && lineTransform->getTransformPixelType() == PT_RGB) {
+  if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) {
     Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar));
     lineTransform->doTransform(in, tmp, length);
     for (int i = 0; i < length; ++i) {
@@ -2176,7 +2176,7 @@ void GfxICCBasedColorSpace::getRGBLine(Guchar *in, unsigned int *out,
 
 void GfxICCBasedColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) {
 #ifdef USE_CMS
-  if (lineTransform != 0 && lineTransform->getTransformPixelType() == PT_RGB) {
+  if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) {
     Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar));
     lineTransform->doTransform(in, tmp, length);
     Guchar *current = tmp;
@@ -2186,7 +2186,7 @@ void GfxICCBasedColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) {
         *out++ = *current++;
     }
     gfree(tmp);
-  } else if (lineTransform != NULL && lineTransform->getTransformPixelType() == PT_CMYK) {
+  } else if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) {
     Guchar* tmp = (Guchar *)gmallocn(4 * length, sizeof(Guchar));
     lineTransform->doTransform(in, tmp, length);
     Guchar *current = tmp;
@@ -2216,7 +2216,7 @@ void GfxICCBasedColorSpace::getRGBLine(Guchar *in, Guchar *out, int length) {
 
 void GfxICCBasedColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) {
 #ifdef USE_CMS
-  if (lineTransform != 0 && lineTransform->getTransformPixelType() == PT_RGB) {
+  if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_RGB) {
     Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar));
     lineTransform->doTransform(in, tmp, length);
     Guchar *current = tmp;
@@ -2237,9 +2237,9 @@ void GfxICCBasedColorSpace::getRGBXLine(Guchar *in, Guchar *out, int length) {
 
 void GfxICCBasedColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) {
 #ifdef USE_CMS
-  if (lineTransform != NULL && lineTransform->getTransformPixelType() == PT_CMYK) {
+  if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) {
     transform->doTransform(in,out,length);
-  } else if (lineTransform != NULL && nComps != 4) {
+  } else if (lineTransform != nullptr && nComps != 4) {
     GfxColorComp c, m, y, k;
     Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar));
     getRGBLine(in, tmp, length);
@@ -2271,7 +2271,7 @@ void GfxICCBasedColorSpace::getCMYKLine(Guchar *in, Guchar *out, int length) {
 
 void GfxICCBasedColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length) {
 #ifdef USE_CMS
-  if (lineTransform != NULL && lineTransform->getTransformPixelType() == PT_CMYK) {
+  if (lineTransform != nullptr && lineTransform->getTransformPixelType() == PT_CMYK) {
     Guchar* tmp = (Guchar *)gmallocn(4 * length, sizeof(Guchar));
     transform->doTransform(in,tmp,length);
     Guchar *p = tmp;
@@ -2282,7 +2282,7 @@ void GfxICCBasedColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length)
         *out++ = 0;
     }
     gfree(tmp);
-  } else if (lineTransform != NULL && nComps != 4) {
+  } else if (lineTransform != nullptr && nComps != 4) {
     GfxColorComp c, m, y, k;
     Guchar* tmp = (Guchar *)gmallocn(3 * length, sizeof(Guchar));
     getRGBLine(in, tmp, length);
@@ -2317,7 +2317,7 @@ void GfxICCBasedColorSpace::getDeviceNLine(Guchar *in, Guchar *out, int length)
 
 void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
 #ifdef USE_CMS
-  if (transform != NULL && transform->getTransformPixelType() == PT_CMYK) {
+  if (transform != nullptr && transform->getTransformPixelType() == PT_CMYK) {
     Guchar in[gfxColorMaxComps];
     Guchar out[gfxColorMaxComps];
     
@@ -2358,7 +2358,7 @@ void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
       unsigned int value = (out[0] << 24) + (out[1] << 16) + (out[2] << 8) + out[3];
       cmsCache.insert(std::pair<unsigned int, unsigned int>(key, value));
     }
-  } else if (nComps != 4 && transform != NULL && transform->getTransformPixelType() == PT_RGB) {
+  } else if (nComps != 4 && transform != nullptr && transform->getTransformPixelType() == PT_RGB) {
     GfxRGB rgb;
     GfxColorComp c, m, y, k;
 
@@ -2387,7 +2387,7 @@ void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
 
 GBool GfxICCBasedColorSpace::useGetRGBLine() {
 #ifdef USE_CMS
-  return lineTransform != NULL || alt->useGetRGBLine();
+  return lineTransform != nullptr || alt->useGetRGBLine();
 #else
   return alt->useGetRGBLine();
 #endif
@@ -2395,7 +2395,7 @@ GBool GfxICCBasedColorSpace::useGetRGBLine() {
 
 GBool GfxICCBasedColorSpace::useGetCMYKLine() {
 #ifdef USE_CMS
-  return lineTransform != NULL || alt->useGetCMYKLine();
+  return lineTransform != nullptr || alt->useGetCMYKLine();
 #else
   return alt->useGetCMYKLine();
 #endif
@@ -2403,7 +2403,7 @@ GBool GfxICCBasedColorSpace::useGetCMYKLine() {
 
 GBool GfxICCBasedColorSpace::useGetDeviceNLine() {
 #ifdef USE_CMS
-  return lineTransform != NULL || alt->useGetDeviceNLine();
+  return lineTransform != nullptr || alt->useGetDeviceNLine();
 #else
   return alt->useGetDeviceNLine();
 #endif
@@ -2722,13 +2722,13 @@ GfxSeparationColorSpace::~GfxSeparationColorSpace() {
   delete name;
   delete alt;
   delete func;
-  if (mapping != NULL)
+  if (mapping != nullptr)
     gfree(mapping);
 }
 
 GfxColorSpace *GfxSeparationColorSpace::copy() {
-  int *mappingA = NULL;
-  if (mapping != NULL) {
+  int *mappingA = nullptr;
+  if (mapping != nullptr) {
     mappingA = (int *) gmalloc(sizeof(int));
     *mappingA = *mapping;
   }
@@ -2857,7 +2857,7 @@ void GfxSeparationColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
 void GfxSeparationColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) {
   for (int i = 0; i < gfxColorMaxComps; i++)
     deviceN->c[i] = 0;
-  if (mapping == NULL || mapping[0] == -1) {
+  if (mapping == nullptr || mapping[0] == -1) {
     GfxCMYK cmyk;
 
     getCMYK(color, &cmyk);
@@ -2900,7 +2900,7 @@ void GfxSeparationColorSpace::createMapping(GooList *separationList, int maxSepC
             error(errSyntaxWarning, -1,
               "Different functions found for '{0:t}', convert immediately", name);
             gfree(mapping);
-            mapping = NULL;
+            mapping = nullptr;
             return;
           }
           *mapping = i+4;
@@ -2913,7 +2913,7 @@ void GfxSeparationColorSpace::createMapping(GooList *separationList, int maxSepC
         error(errSyntaxWarning, -1,
 	        "Too many ({0:d}) spots, convert '{1:t}' immediately", maxSepComps, name);
         gfree(mapping);
-        mapping = NULL;
+        mapping = nullptr;
         return;
       }
       *mapping = separationList->getLength() + 4;
@@ -2940,7 +2940,7 @@ GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA,
   sepsCS = sepsCSA;
   nonMarking = gTrue;
   overprintMask = 0;
-  mapping = NULL;
+  mapping = nullptr;
   for (i = 0; i < nComps; ++i) {
     names[i] = namesA[i];
     if (names[i]->cmp("None")) {
@@ -2993,22 +2993,22 @@ GfxDeviceNColorSpace::~GfxDeviceNColorSpace() {
   delete alt;
   delete func;
   deleteGooList(sepsCS, GfxSeparationColorSpace);
-  if (mapping != NULL)
+  if (mapping != nullptr)
     gfree(mapping);
 }
 
 GfxColorSpace *GfxDeviceNColorSpace::copy() {
   int i;
-  int *mappingA = NULL;
+  int *mappingA = nullptr;
 
   GooList *sepsCSA = new GooList(sepsCS->getLength());
   for (i = 0; i < sepsCS->getLength(); i++) {
     GfxSeparationColorSpace *scs = (GfxSeparationColorSpace *) sepsCS->get(i);
-    if (likely(scs != NULL)) {
+    if (likely(scs != nullptr)) {
       sepsCSA->append(scs->copy());
     }
   }
-  if (mapping != NULL) {
+  if (mapping != nullptr) {
     mappingA = (int *)gmalloc(sizeof(int) * nComps);
     for (i = 0; i < nComps; i++)
       mappingA[i] = mapping[i];
@@ -3092,7 +3092,7 @@ GfxColorSpace *GfxDeviceNColorSpace::parse(GfxResources *res, Array *arr, Output
   }
  err1:
   delete separationList;
-  return NULL;
+  return nullptr;
 }
 
 void GfxDeviceNColorSpace::getGray(GfxColor *color, GfxGray *gray) {
@@ -3143,7 +3143,7 @@ void GfxDeviceNColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk) {
 void GfxDeviceNColorSpace::getDeviceN(GfxColor *color, GfxColor *deviceN) {
   for (int i = 0; i < gfxColorMaxComps; i++)
     deviceN->c[i] = 0;
-  if (mapping == NULL) {
+  if (mapping == nullptr) {
     GfxCMYK cmyk;
 
     getCMYK(color, &cmyk);
@@ -3189,7 +3189,7 @@ void GfxDeviceNColorSpace::createMapping(GooList *separationList, int maxSepComp
     } else {
       Guint startOverprintMask = 0x10;
       GBool found = gFalse;
-      Function *sepFunc = NULL;
+      Function *sepFunc = nullptr;
       if (nComps == 1)
         sepFunc = func;
       else {
@@ -3204,11 +3204,11 @@ void GfxDeviceNColorSpace::createMapping(GooList *separationList, int maxSepComp
       for (int j = 0; j < separationList->getLength(); j++) {
         GfxSeparationColorSpace *sepCS = (GfxSeparationColorSpace *)separationList->get(j);
         if (!sepCS->getName()->cmp(names[i])) {
-          if (sepFunc != NULL && sepCS->getFunc()->hasDifferentResultSet(sepFunc)) {
+          if (sepFunc != nullptr && sepCS->getFunc()->hasDifferentResultSet(sepFunc)) {
             error(errSyntaxWarning, -1,
               "Different functions found for '{0:t}', convert immediately", names[i]);
             gfree(mapping);
-            mapping = NULL;
+            mapping = nullptr;
             overprintMask = 0xffffffff;
             return;
           }
@@ -3224,7 +3224,7 @@ void GfxDeviceNColorSpace::createMapping(GooList *separationList, int maxSepComp
           error(errSyntaxWarning, -1,
             "Too many ({0:d}) spots, convert '{1:t}' immediately", maxSepComps, names[i]);
           gfree(mapping);
-          mapping = NULL;
+          mapping = nullptr;
           overprintMask = 0xffffffff;
           return;
         }
@@ -3244,7 +3244,7 @@ void GfxDeviceNColorSpace::createMapping(GooList *separationList, int maxSepComp
           if(!found) {
             error(errSyntaxWarning, -1, "DeviceN has no suitable colorant");
             gfree(mapping);
-            mapping = NULL;
+            mapping = nullptr;
             overprintMask = 0xffffffff;
             return;
           }
@@ -3271,7 +3271,7 @@ GfxPatternColorSpace::~GfxPatternColorSpace() {
 
 GfxColorSpace *GfxPatternColorSpace::copy() {
   return new GfxPatternColorSpace(under ? under->copy() :
-				          (GfxColorSpace *)NULL);
+				          (GfxColorSpace *)nullptr);
 }
 
 GfxColorSpace *GfxPatternColorSpace::parse(GfxResources *res, Array *arr, OutputDev *out, GfxState *state, int recursion) {
@@ -3281,14 +3281,14 @@ GfxColorSpace *GfxPatternColorSpace::parse(GfxResources *res, Array *arr, Output
 
   if (arr->getLength() != 1 && arr->getLength() != 2) {
     error(errSyntaxWarning, -1, "Bad Pattern color space");
-    return NULL;
+    return nullptr;
   }
-  underA = NULL;
+  underA = nullptr;
   if (arr->getLength() == 2) {
     obj1 = arr->get(1);
     if (!(underA = GfxColorSpace::parse(res, &obj1, out, state, recursion + 1))) {
       error(errSyntaxWarning, -1, "Bad Pattern color space (underlying color space)");
-      return NULL;
+      return nullptr;
     }
   }
   cs = new GfxPatternColorSpace(underA);
@@ -3343,7 +3343,7 @@ GfxPattern *GfxPattern::parse(GfxResources *res, Object *obj, OutputDev *out, Gf
   } else {
     return nullptr;
   }
-  pattern = NULL;
+  pattern = nullptr;
   if (obj1.isInt() && obj1.getInt() == 1) {
     pattern = GfxTilingPattern::parse(obj, patternRefNum);
   } else if (obj1.isInt() && obj1.getInt() == 2) {
@@ -3366,7 +3366,7 @@ GfxTilingPattern *GfxTilingPattern::parse(Object *patObj, int patternRefNum) {
   int i;
 
   if (!patObj->isStream()) {
-    return NULL;
+    return nullptr;
   }
   dict = patObj->streamGetDict();
 
@@ -3474,14 +3474,14 @@ GfxShadingPattern *GfxShadingPattern::parse(GfxResources *res, Object *patObj, O
   int i;
 
   if (!patObj->isDict()) {
-    return NULL;
+    return nullptr;
   }
   dict = patObj->getDict();
 
   obj1 = dict->lookup("Shading");
   shadingA = GfxShading::parse(res, &obj1, out, state);
   if (!shadingA) {
-    return NULL;
+    return nullptr;
   }
 
   matrixA[0] = 1; matrixA[1] = 0;
@@ -3525,7 +3525,7 @@ GfxPattern *GfxShadingPattern::copy() {
 
 GfxShading::GfxShading(int typeA) {
   type = typeA;
-  colorSpace = NULL;
+  colorSpace = nullptr;
 }
 
 GfxShading::GfxShading(GfxShading *shading) {
@@ -3561,13 +3561,13 @@ GfxShading *GfxShading::parse(GfxResources *res, Object *obj, OutputDev *out, Gf
   } else if (obj->isStream()) {
     dict = obj->streamGetDict();
   } else {
-    return NULL;
+    return nullptr;
   }
 
   obj1 = dict->lookup("ShadingType");
   if (!obj1.isInt()) {
     error(errSyntaxWarning, -1, "Invalid ShadingType in shading dictionary");
-    return NULL;
+    return nullptr;
   }
   typeA = obj1.getInt();
 
@@ -3621,7 +3621,7 @@ GfxShading *GfxShading::parse(GfxResources *res, Object *obj, OutputDev *out, Gf
   return shading;
 
  err1:
-  return NULL;
+  return nullptr;
 }
 
 GBool GfxShading::init(GfxResources *res, Dict *dict, OutputDev *out, GfxState *state) {
@@ -3787,7 +3787,7 @@ GfxFunctionShading *GfxFunctionShading::parse(GfxResources *res, Dict *dict, Out
 				   funcsA, nFuncsA);
   if (!shading->init(res, dict, out, state)) {
     delete shading;
-    return NULL;
+    return nullptr;
   }
   return shading;
 }
@@ -3838,9 +3838,9 @@ GfxUnivariateShading::GfxUnivariateShading(int typeA,
 
   cacheSize = 0;
   lastMatch = 0;
-  cacheBounds = NULL;
-  cacheCoeff = NULL;
-  cacheValues = NULL;
+  cacheBounds = nullptr;
+  cacheCoeff = nullptr;
+  cacheValues = nullptr;
 }
 
 GfxUnivariateShading::GfxUnivariateShading(GfxUnivariateShading *shading):
@@ -3859,9 +3859,9 @@ GfxUnivariateShading::GfxUnivariateShading(GfxUnivariateShading *shading):
 
   cacheSize = 0;
   lastMatch = 0;
-  cacheBounds = NULL;
-  cacheCoeff = NULL;
-  cacheValues = NULL;
+  cacheBounds = nullptr;
+  cacheCoeff = nullptr;
+  cacheValues = nullptr;
 }
 
 GfxUnivariateShading::~GfxUnivariateShading() {
@@ -3934,7 +3934,7 @@ void GfxUnivariateShading::setupCache(const Matrix *ctm,
   int i, j, nComps, maxSize;
 
   gfree (cacheBounds);
-  cacheBounds = NULL;
+  cacheBounds = nullptr;
   cacheSize = 0;
 
   if (unlikely(nFuncs < 1))
@@ -4293,7 +4293,7 @@ GfxRadialShading *GfxRadialShading::parse(GfxResources *res, Dict *dict, OutputD
 				 funcsA, nFuncsA, extend0A, extend1A);
   if (!shading->init(res, dict, out, state)) {
     delete shading;
-    return NULL;
+    return nullptr;
   }
   return shading;
 }
@@ -4829,8 +4829,8 @@ GfxGouraudTriangleShading *GfxGouraudTriangleShading::parse(GfxResources *res, i
   }
 
   nVerticesA = nTrianglesA = 0;
-  verticesA = NULL;
-  trianglesA = NULL;
+  verticesA = nullptr;
+  trianglesA = nullptr;
   vertSize = triSize = 0;
   state = 0;
   flag = 0; // make gcc happy
@@ -4922,7 +4922,7 @@ GfxGouraudTriangleShading *GfxGouraudTriangleShading::parse(GfxResources *res, i
 					  funcsA, nFuncsA);
   if (!shading->init(res, dict, out, gfxState)) {
     delete shading;
-    return NULL;
+    return nullptr;
   }
   return shading;
 }
@@ -5160,7 +5160,7 @@ GfxPatchMeshShading *GfxPatchMeshShading::parse(GfxResources *res, int typeA, Di
   }
 
   nPatchesA = 0;
-  patchesA = NULL;
+  patchesA = nullptr;
   patchesSize = 0;
   bitBuf = new GfxShadingBitBuf(str);
   while (1) {
@@ -5643,10 +5643,10 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
 
   // initialize
   for (k = 0; k < gfxColorMaxComps; ++k) {
-    lookup[k] = NULL;
-    lookup2[k] = NULL;
+    lookup[k] = nullptr;
+    lookup2[k] = nullptr;
   }
-  byte_lookup = NULL;
+  byte_lookup = nullptr;
 
   // get decode map
   if (decode->isNull()) {
@@ -5692,7 +5692,7 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
   // Optimization: for Indexed and Separation color spaces (which have
   // only one component), we pre-compute a second lookup table with
   // color values
-  colorSpace2 = NULL;
+  colorSpace2 = nullptr;
   nComps2 = 0;
   useByteLookup = gFalse;
   switch (colorSpace->getMode()) {
@@ -5789,9 +5789,9 @@ GfxImageColorMap::GfxImageColorMap(GfxImageColorMap *colorMap) {
   nComps2 = colorMap->nComps2;
   useMatte = colorMap->useMatte;
   matteColor = colorMap->matteColor;
-  colorSpace2 = NULL;
+  colorSpace2 = nullptr;
   for (k = 0; k < gfxColorMaxComps; ++k) {
-    lookup[k] = NULL;
+    lookup[k] = nullptr;
   }
   n = 1 << bits;
   if (colorSpace->getMode() == csIndexed) {
@@ -6383,7 +6383,7 @@ GfxState::ReusablePathIterator::ReusablePathIterator(GfxPath *path)
    subPathOff(0),
    coordOff(0),
    numCoords(0),
-   curSubPath(NULL)
+   curSubPath(nullptr)
 {
   if( path->getNumSubpaths() ) {
     curSubPath = path->getSubpath(subPathOff);
@@ -6474,18 +6474,18 @@ GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
   strokeColorSpace = new GfxDeviceGrayColorSpace();
   fillColor.c[0] = 0;
   strokeColor.c[0] = 0;
-  fillPattern = NULL;
-  strokePattern = NULL;
+  fillPattern = nullptr;
+  strokePattern = nullptr;
   blendMode = gfxBlendNormal;
   fillOpacity = 1;
   strokeOpacity = 1;
   fillOverprint = gFalse;
   strokeOverprint = gFalse;
   overprintMode = 0;
-  transfer[0] = transfer[1] = transfer[2] = transfer[3] = NULL;
+  transfer[0] = transfer[1] = transfer[2] = transfer[3] = nullptr;
 
   lineWidth = 1;
-  lineDash = NULL;
+  lineDash = nullptr;
   lineDashLength = 0;
   lineDashStart = 0;
   flatness = 1;
@@ -6496,7 +6496,7 @@ GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
   alphaIsShape = gFalse;
   textKnockout = gFalse;
 
-  font = NULL;
+  font = nullptr;
   fontSize = 0;
   textMat[0] = 1; textMat[1] = 0;
   textMat[2] = 0; textMat[3] = 1;
@@ -6519,14 +6519,14 @@ GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
 
   renderingIntent[0] = 0;
 
-  saved = NULL;
+  saved = nullptr;
 #ifdef USE_CMS
   GfxColorSpace::setupColorProfiles();
-  XYZ2DisplayTransformRelCol = NULL;
-  XYZ2DisplayTransformAbsCol = NULL;
-  XYZ2DisplayTransformSat = NULL;
-  XYZ2DisplayTransformPerc = NULL;
-  localDisplayProfile = NULL;
+  XYZ2DisplayTransformRelCol = nullptr;
+  XYZ2DisplayTransformAbsCol = nullptr;
+  XYZ2DisplayTransformSat = nullptr;
+  XYZ2DisplayTransformPerc = nullptr;
+  localDisplayProfile = nullptr;
   displayProfileRef = 0;
 #endif
 }
@@ -6576,7 +6576,7 @@ GfxState::~GfxState() {
     if (XYZ2DisplayTransformPerc->unref() == 0)
       delete XYZ2DisplayTransformPerc;
   }
-  if (--displayProfileRef == 0 && localDisplayProfile != NULL) {
+  if (--displayProfileRef == 0 && localDisplayProfile != nullptr) {
     cmsCloseProfile(localDisplayProfile);
   }
 #endif
@@ -6614,7 +6614,7 @@ GfxState::GfxState(GfxState *state, GBool copyPath) {
   if (copyPath) {
     path = state->path->copy();
   }
-  saved = NULL;
+  saved = nullptr;
 #ifdef USE_CMS
   if (XYZ2DisplayTransformRelCol) {
     XYZ2DisplayTransformRelCol->ref();
@@ -6636,11 +6636,11 @@ GfxState::GfxState(GfxState *state, GBool copyPath) {
 
 #ifdef USE_CMS
 void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) {
-  if (localDisplayProfile != NULL) {
+  if (localDisplayProfile != nullptr) {
     cmsCloseProfile(localDisplayProfile);
   }
   localDisplayProfile = localDisplayProfileA;
-  if (localDisplayProfileA != NULL) {
+  if (localDisplayProfileA != nullptr) {
     cmsHTRANSFORM transform;
     unsigned int nChannels;
     unsigned int localDisplayPixelType;
@@ -6654,7 +6654,7 @@ void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) {
 	   localDisplayProfile,
 	   COLORSPACE_SH(localDisplayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) {
+	  INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransformRelCol = new GfxColorTransform(transform, INTENT_RELATIVE_COLORIMETRIC, PT_XYZ, localDisplayPixelType);
@@ -6663,7 +6663,7 @@ void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) {
 	   localDisplayProfile,
 	   COLORSPACE_SH(localDisplayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_ABSOLUTE_COLORIMETRIC,LCMS_FLAGS)) == 0) {
+	  INTENT_ABSOLUTE_COLORIMETRIC,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransformAbsCol = new GfxColorTransform(transform, INTENT_ABSOLUTE_COLORIMETRIC, PT_XYZ, localDisplayPixelType);
@@ -6672,7 +6672,7 @@ void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) {
 	   localDisplayProfile,
 	   COLORSPACE_SH(localDisplayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_SATURATION,LCMS_FLAGS)) == 0) {
+	  INTENT_SATURATION,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransformSat = new GfxColorTransform(transform, INTENT_SATURATION, PT_XYZ, localDisplayPixelType);
@@ -6681,7 +6681,7 @@ void GfxState::setDisplayProfile(cmsHPROFILE localDisplayProfileA) {
 	   localDisplayProfile,
 	   COLORSPACE_SH(localDisplayPixelType) |
 	     CHANNELS_SH(nChannels) | BYTES_SH(1),
-	  INTENT_PERCEPTUAL,LCMS_FLAGS)) == 0) {
+	  INTENT_PERCEPTUAL,LCMS_FLAGS)) == nullptr) {
       error(errSyntaxWarning, -1, "Can't create Lab transform");
     } else {
       XYZ2DisplayTransformPerc = new GfxColorTransform(transform, INTENT_PERCEPTUAL, PT_XYZ, localDisplayPixelType);
@@ -6701,7 +6701,7 @@ GfxColorTransform *GfxState::getXYZ2DisplayTransform() {
   } else if (strcmp(renderingIntent, "Perceptual") == 0) {
     transform = XYZ2DisplayTransformPerc;
   }
-  if (transform == NULL) {
+  if (transform == nullptr) {
     transform = XYZ2DisplayTransform;
   }
   return transform;
@@ -7087,8 +7087,8 @@ GfxState *GfxState::restore() {
     oldState->lineX = lineX;
     oldState->lineY = lineY;
 
-    path = NULL;
-    saved = NULL;
+    path = nullptr;
+    saved = nullptr;
     delete this;
 
   } else {
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index fafd8932..50b7eee2 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -127,7 +127,7 @@ extern XpdfPluginVecTable xpdfPluginVecTable;
 
 //------------------------------------------------------------------------
 
-GlobalParams *globalParams = NULL;
+GlobalParams *globalParams = nullptr;
 
 #if defined(ENABLE_RELOCATABLE) && defined(_WIN32)
 
@@ -367,13 +367,13 @@ SysFontInfo *SysFontList::find(GooString *name, GBool fixedWidth, GBool exact) {
   }
 
   // search for the font
-  fi = NULL;
+  fi = nullptr;
   for (i = 0; i < fonts->getLength(); ++i) {
     fi = (SysFontInfo *)fonts->get(i);
     if (fi->match(name2, bold, italic, oblique, fixedWidth)) {
       break;
     }
-    fi = NULL;
+    fi = nullptr;
   }
   if (!fi && !exact && bold) {
     // try ignoring the bold flag
@@ -382,7 +382,7 @@ SysFontInfo *SysFontList::find(GooString *name, GBool fixedWidth, GBool exact) {
       if (fi->match(name2, gFalse, italic)) {
 	break;
       }
-      fi = NULL;
+      fi = nullptr;
     }
   }
   if (!fi && !exact && (bold || italic)) {
@@ -392,7 +392,7 @@ SysFontInfo *SysFontList::find(GooString *name, GBool fixedWidth, GBool exact) {
       if (fi->match(name2, gFalse, gFalse)) {
 	break;
       }
-      fi = NULL;
+      fi = nullptr;
     }
   }
 
@@ -652,7 +652,7 @@ void GlobalParams::scanEncodingDirs() {
   
   snprintf(dataPathBuffer, bufSize, "%s/nameToUnicode", dataRoot);
   dir = new GDir(dataPathBuffer, gTrue);
-  while (entry = dir->getNextEntry(), entry != NULL) {
+  while (entry = dir->getNextEntry(), entry != nullptr) {
     if (!entry->isDir()) {
       parseNameToUnicode(entry->getFullPath());
     }
@@ -662,7 +662,7 @@ void GlobalParams::scanEncodingDirs() {
 
   snprintf(dataPathBuffer, bufSize, "%s/cidToUnicode", dataRoot);
   dir = new GDir(dataPathBuffer, gFalse);
-  while (entry = dir->getNextEntry(), entry != NULL) {
+  while (entry = dir->getNextEntry(), entry != nullptr) {
     addCIDToUnicode(entry->getName(), entry->getFullPath());
     delete entry;
   }
@@ -670,7 +670,7 @@ void GlobalParams::scanEncodingDirs() {
 
   snprintf(dataPathBuffer, bufSize, "%s/unicodeMap", dataRoot);
   dir = new GDir(dataPathBuffer, gFalse);
-  while (entry = dir->getNextEntry(), entry != NULL) {
+  while (entry = dir->getNextEntry(), entry != nullptr) {
     addUnicodeMap(entry->getName(), entry->getFullPath());
     delete entry;
   }
@@ -678,7 +678,7 @@ void GlobalParams::scanEncodingDirs() {
 
   snprintf(dataPathBuffer, bufSize, "%s/cMap", dataRoot);
   dir = new GDir(dataPathBuffer, gFalse);
-  while (entry = dir->getNextEntry(), entry != NULL) {
+  while (entry = dir->getNextEntry(), entry != nullptr) {
     addCMapDir(entry->getName(), entry->getFullPath());
     toUnicodeDirs->append(entry->getFullPath()->copy());
     delete entry;
@@ -704,7 +704,7 @@ void GlobalParams::parseNameToUnicode(GooString *name) {
   line = 1;
   while (getLine(buf, sizeof(buf), f)) {
     tok1 = strtok_r(buf, " \t\r\n", &tokptr);
-    tok2 = strtok_r(NULL, " \t\r\n", &tokptr);
+    tok2 = strtok_r(nullptr, " \t\r\n", &tokptr);
     if (tok1 && tok2) {
       sscanf(tok1, "%x", &u);
       nameToUnicodeText->add(tok2, u);
@@ -846,7 +846,7 @@ FILE *GlobalParams::getUnicodeMapFile(GooString *encodingName) {
   if ((fileName = (GooString *)unicodeMaps->lookup(encodingName))) {
     f = openFile(fileName->getCString(), "r");
   } else {
-    f = NULL;
+    f = nullptr;
   }
   unlockGlobalParams;
   return f;
@@ -862,7 +862,7 @@ FILE *GlobalParams::findCMapFile(GooString *collection, GooString *cMapName) {
   lockGlobalParams;
   if (!(list = (GooList *)cMapDirs->lookup(collection))) {
     unlockGlobalParams;
-    return NULL;
+    return nullptr;
   }
   for (i = 0; i < list->getLength(); ++i) {
     dir = (GooString *)list->get(i);
@@ -875,7 +875,7 @@ FILE *GlobalParams::findCMapFile(GooString *collection, GooString *cMapName) {
     }
   }
   unlockGlobalParams;
-  return NULL;
+  return nullptr;
 }
 
 FILE *GlobalParams::findToUnicodeFile(GooString *name) {
@@ -895,7 +895,7 @@ FILE *GlobalParams::findToUnicodeFile(GooString *name) {
     }
   }
   unlockGlobalParams;
-  return NULL;
+  return nullptr;
 }
 
 #ifdef WITH_FONTCONFIGURATION_FONTCONFIG
@@ -903,12 +903,12 @@ static GBool findModifier(const char *name, const char *modifier, const char **s
 {
   const char *match;
 
-  if (name == NULL)
+  if (name == nullptr)
     return gFalse;
 
   match = strstr(name, modifier);
   if (match) {
-    if (*start == NULL || match < *start)
+    if (*start == nullptr || match < *start)
       *start = match;
     return gTrue;
   }
@@ -965,10 +965,10 @@ static FcPattern *buildFcPattern(GfxFont *font, GooString *base14Name)
   FcPattern *p;
 
   // this is all heuristics will be overwritten if font had proper info
-  name = (base14Name == NULL) ? font->getName()->getCString() : base14Name->getCString();
+  name = (base14Name == nullptr) ? font->getName()->getCString() : base14Name->getCString();
   
   modifiers = strchr (name, ',');
-  if (modifiers == NULL)
+  if (modifiers == nullptr)
     modifiers = strchr (name, '-');
   
   // remove the - from the names, for some reason, Fontconfig does not
@@ -977,7 +977,7 @@ static FcPattern *buildFcPattern(GfxFont *font, GooString *base14Name)
   for (int i = 0; i < len; i++)
     name[i] = (name[i] == '-' ? ' ' : name[i]);
 
-  start = NULL;
+  start = nullptr;
   findModifier(modifiers, "Regular", &start);
   findModifier(modifiers, "Roman", &start);
   
@@ -1056,7 +1056,7 @@ static FcPattern *buildFcPattern(GfxFont *font, GooString *base14Name)
   
   const char *lang = getFontLang(font);
   
-  p = FcPatternBuild(NULL,
+  p = FcPatternBuild(nullptr,
                     FC_FAMILY, FcTypeString, family,
                     FC_LANG, FcTypeString, lang,
                     NULL);
@@ -1074,7 +1074,7 @@ static FcPattern *buildFcPattern(GfxFont *font, GooString *base14Name)
 GooString *GlobalParams::findFontFile(GooString *fontName) {
   GooString *path;
 
-  setupBaseFonts(NULL);
+  setupBaseFonts(nullptr);
   lockGlobalParams;
   if ((path = (GooString *)fontFiles->lookup(fontName))) {
     path = path->copy();
@@ -1082,7 +1082,7 @@ GooString *GlobalParams::findFontFile(GooString *fontName) {
     return path;
   }
   unlockGlobalParams;
-  return NULL;
+  return nullptr;
 }
 
 /* if you can't or don't want to use Fontconfig, you need to implement
@@ -1097,18 +1097,18 @@ GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font
   SysFontType type;
   int fontNum;
   
-  return findSystemFontFile(font, &type, &fontNum, NULL, base14Name);
+  return findSystemFontFile(font, &type, &fontNum, nullptr, base14Name);
 }
 
 GooString *GlobalParams::findSystemFontFile(GfxFont *font,
 					  SysFontType *type,
 					  int *fontNum, GooString *substituteFontName, GooString *base14Name) {
-  SysFontInfo *fi = NULL;
-  FcPattern *p=0;
-  GooString *path = NULL;
+  SysFontInfo *fi = nullptr;
+  FcPattern *p=nullptr;
+  GooString *path = nullptr;
   GooString *fontName = font->getName();
   GooString substituteName;
-  if (!fontName) return NULL;
+  if (!fontName) return nullptr;
   lockGlobalParams;
 
   if ((fi = sysFonts->find(fontName, font->isFixedWidth(), gTrue))) {
@@ -1122,14 +1122,14 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
     FcResult res;
     FcFontSet *set;
     int i;
-    FcLangSet *lb = NULL;
+    FcLangSet *lb = nullptr;
     p = buildFcPattern(font, base14Name);
 
     if (!p)
       goto fin;
-    FcConfigSubstitute(NULL, p, FcMatchPattern);
+    FcConfigSubstitute(nullptr, p, FcMatchPattern);
     FcDefaultSubstitute(p);
-    set = FcFontSort(NULL, p, FcFalse, NULL, &res);
+    set = FcFontSort(nullptr, p, FcFalse, nullptr, &res);
     if (!set)
       goto fin;
 
@@ -1145,14 +1145,14 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
       first: fonts support the language
       second: all fonts (fall back)
     */
-    while (fi == NULL)
+    while (fi == nullptr)
     {
       for (i = 0; i < set->nfont; ++i)
       {
 	res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s);
 	if (res != FcResultMatch || !s)
 	  continue;
-	if (lb != NULL) {
+	if (lb != nullptr) {
 	  FcLangSet *l;
 	  res = FcPatternGetLangSet(set->fonts[i], FC_LANG, 0, &l);
 	  if (res != FcResultMatch || !FcLangSetContains(l,lb)) {
@@ -1237,9 +1237,9 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
 	  continue;
 	break;
       }
-      if (lb != NULL) {
+      if (lb != nullptr) {
         FcLangSetDestroy(lb);
-        lb = NULL;
+        lb = nullptr;
       } else {
         /* scan all fonts of the list */
         break;
@@ -1247,7 +1247,7 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
     }
     FcFontSetDestroy(set);
   }
-  if (path == NULL && (fi = sysFonts->find(fontName, font->isFixedWidth(), gFalse))) {
+  if (path == nullptr && (fi = sysFonts->find(fontName, font->isFixedWidth(), gFalse))) {
     path = fi->path->copy();
     *type = fi->type;
     *fontNum = fi->fontNum;
@@ -1471,7 +1471,7 @@ CharCodeToUnicode *GlobalParams::getUnicodeToUnicode(GooString *fontName) {
   lockGlobalParams;
   GooHashIter *iter;
   unicodeToUnicodes->startIter(&iter);
-  GooString *fileName = NULL;
+  GooString *fileName = nullptr;
   GooString *fontPattern;
   void *val;
   while (!fileName && unicodeToUnicodes->getNext(&iter, &fontPattern, &val)) {
@@ -1480,7 +1480,7 @@ CharCodeToUnicode *GlobalParams::getUnicodeToUnicode(GooString *fontName) {
       fileName = (GooString*)val;
     }
   }
-  CharCodeToUnicode *ctu = NULL;
+  CharCodeToUnicode *ctu = nullptr;
   if (fileName) {
     ctu = unicodeToUnicodeCache->getCharCodeToUnicode(fileName);
     if (!ctu) {
@@ -1670,7 +1670,7 @@ XpdfSecurityHandler *GlobalParams::getSecurityHandler(char *name) {
   (void)name;
 #endif
 
-  return NULL;
+  return nullptr;
 }
 
 #ifdef ENABLE_PLUGINS
diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index f122fcb6..aca10a68 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -103,78 +103,78 @@ static const struct {
 
     // those seem to be frequently accessed by PDF files and I kind of guess
     // which font file do the refer to
-    {"Palatino", NULL, "pala.ttf", gTrue},
-    {"Palatino-Roman", NULL, "pala.ttf", gTrue},
-    {"Palatino-Bold", NULL, "palab.ttf", gTrue},
-    {"Palatino-Italic", NULL, "palai.ttf", gTrue},
-    {"Palatino,Italic", NULL, "palai.ttf", gTrue},
-    {"Palatino-BoldItalic", NULL, "palabi.ttf", gTrue},
-
-    {"ArialBlack",        NULL, "arialbd.ttf", gTrue},
-
-    {"ArialNarrow", NULL, "arialn.ttf", gTrue},
-    {"ArialNarrow,Bold", NULL, "arialnb.ttf", gTrue},
-    {"ArialNarrow,Italic", NULL, "arialni.ttf", gTrue},
-    {"ArialNarrow,BoldItalic", NULL, "arialnbi.ttf", gTrue},
-    {"ArialNarrow-Bold", NULL, "arialnb.ttf", gTrue},
-    {"ArialNarrow-Italic", NULL, "arialni.ttf", gTrue},
-    {"ArialNarrow-BoldItalic", NULL, "arialnbi.ttf", gTrue},
-
-    {"HelveticaNarrow", NULL, "arialn.ttf", gTrue},
-    {"HelveticaNarrow,Bold", NULL, "arialnb.ttf", gTrue},
-    {"HelveticaNarrow,Italic", NULL, "arialni.ttf", gTrue},
-    {"HelveticaNarrow,BoldItalic", NULL, "arialnbi.ttf", gTrue},
-    {"HelveticaNarrow-Bold", NULL, "arialnb.ttf", gTrue},
-    {"HelveticaNarrow-Italic", NULL, "arialni.ttf", gTrue},
-    {"HelveticaNarrow-BoldItalic", NULL, "arialnbi.ttf", gTrue},
-
-    {"BookAntiqua", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua,Bold", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua,Italic", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua,BoldItalic", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua-Bold", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua-Italic", NULL, "bkant.ttf", gTrue},
-    {"BookAntiqua-BoldItalic", NULL, "bkant.ttf", gTrue},
-
-    {"Verdana", NULL, "verdana.ttf", gTrue},
-    {"Verdana,Bold", NULL, "verdanab.ttf", gTrue},
-    {"Verdana,Italic", NULL, "verdanai.ttf", gTrue},
-    {"Verdana,BoldItalic", NULL, "verdanaz.ttf", gTrue},
-    {"Verdana-Bold", NULL, "verdanab.ttf", gTrue},
-    {"Verdana-Italic", NULL, "verdanai.ttf", gTrue},
-    {"Verdana-BoldItalic", NULL, "verdanaz.ttf", gTrue},
-
-    {"Tahoma", NULL, "tahoma.ttf", gTrue},
-    {"Tahoma,Bold", NULL, "tahomabd.ttf", gTrue},
-    {"Tahoma,Italic", NULL, "tahoma.ttf", gTrue},
-    {"Tahoma,BoldItalic", NULL, "tahomabd.ttf", gTrue},
-    {"Tahoma-Bold", NULL, "tahomabd.ttf", gTrue},
-    {"Tahoma-Italic", NULL, "tahoma.ttf", gTrue},
-    {"Tahoma-BoldItalic", NULL, "tahomabd.ttf", gTrue},
-
-    {"CCRIKH+Verdana", NULL, "verdana.ttf", gTrue},
-    {"CCRIKH+Verdana,Bold", NULL, "verdanab.ttf", gTrue},
-    {"CCRIKH+Verdana,Italic", NULL, "verdanai.ttf", gTrue},
-    {"CCRIKH+Verdana,BoldItalic", NULL, "verdanaz.ttf", gTrue},
-    {"CCRIKH+Verdana-Bold", NULL, "verdanab.ttf", gTrue},
-    {"CCRIKH+Verdana-Italic", NULL, "verdanai.ttf", gTrue},
-    {"CCRIKH+Verdana-BoldItalic", NULL, "verdanaz.ttf", gTrue},
-
-    {"Georgia", NULL, "georgia.ttf", gTrue},
-    {"Georgia,Bold", NULL, "georgiab.ttf", gTrue},
-    {"Georgia,Italic", NULL, "georgiai.ttf", gTrue},
-    {"Georgia,BoldItalic", NULL, "georgiaz.ttf", gTrue},
-    {"Georgia-Bold", NULL, "georgiab.ttf", gTrue},
-    {"Georgia-Italic", NULL, "georgiai.ttf", gTrue},
-    {"Georgia-BoldItalic", NULL, "georgiaz.ttf", gTrue},
+    {"Palatino", nullptr, "pala.ttf", gTrue},
+    {"Palatino-Roman", nullptr, "pala.ttf", gTrue},
+    {"Palatino-Bold", nullptr, "palab.ttf", gTrue},
+    {"Palatino-Italic", nullptr, "palai.ttf", gTrue},
+    {"Palatino,Italic", nullptr, "palai.ttf", gTrue},
+    {"Palatino-BoldItalic", nullptr, "palabi.ttf", gTrue},
+
+    {"ArialBlack",        nullptr, "arialbd.ttf", gTrue},
+
+    {"ArialNarrow", nullptr, "arialn.ttf", gTrue},
+    {"ArialNarrow,Bold", nullptr, "arialnb.ttf", gTrue},
+    {"ArialNarrow,Italic", nullptr, "arialni.ttf", gTrue},
+    {"ArialNarrow,BoldItalic", nullptr, "arialnbi.ttf", gTrue},
+    {"ArialNarrow-Bold", nullptr, "arialnb.ttf", gTrue},
+    {"ArialNarrow-Italic", nullptr, "arialni.ttf", gTrue},
+    {"ArialNarrow-BoldItalic", nullptr, "arialnbi.ttf", gTrue},
+
+    {"HelveticaNarrow", nullptr, "arialn.ttf", gTrue},
+    {"HelveticaNarrow,Bold", nullptr, "arialnb.ttf", gTrue},
+    {"HelveticaNarrow,Italic", nullptr, "arialni.ttf", gTrue},
+    {"HelveticaNarrow,BoldItalic", nullptr, "arialnbi.ttf", gTrue},
+    {"HelveticaNarrow-Bold", nullptr, "arialnb.ttf", gTrue},
+    {"HelveticaNarrow-Italic", nullptr, "arialni.ttf", gTrue},
+    {"HelveticaNarrow-BoldItalic", nullptr, "arialnbi.ttf", gTrue},
+
+    {"BookAntiqua", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua,Bold", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua,Italic", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua,BoldItalic", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua-Bold", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua-Italic", nullptr, "bkant.ttf", gTrue},
+    {"BookAntiqua-BoldItalic", nullptr, "bkant.ttf", gTrue},
+
+    {"Verdana", nullptr, "verdana.ttf", gTrue},
+    {"Verdana,Bold", nullptr, "verdanab.ttf", gTrue},
+    {"Verdana,Italic", nullptr, "verdanai.ttf", gTrue},
+    {"Verdana,BoldItalic", nullptr, "verdanaz.ttf", gTrue},
+    {"Verdana-Bold", nullptr, "verdanab.ttf", gTrue},
+    {"Verdana-Italic", nullptr, "verdanai.ttf", gTrue},
+    {"Verdana-BoldItalic", nullptr, "verdanaz.ttf", gTrue},
+
+    {"Tahoma", nullptr, "tahoma.ttf", gTrue},
+    {"Tahoma,Bold", nullptr, "tahomabd.ttf", gTrue},
+    {"Tahoma,Italic", nullptr, "tahoma.ttf", gTrue},
+    {"Tahoma,BoldItalic", nullptr, "tahomabd.ttf", gTrue},
+    {"Tahoma-Bold", nullptr, "tahomabd.ttf", gTrue},
+    {"Tahoma-Italic", nullptr, "tahoma.ttf", gTrue},
+    {"Tahoma-BoldItalic", nullptr, "tahomabd.ttf", gTrue},
+
+    {"CCRIKH+Verdana", nullptr, "verdana.ttf", gTrue},
+    {"CCRIKH+Verdana,Bold", nullptr, "verdanab.ttf", gTrue},
+    {"CCRIKH+Verdana,Italic", nullptr, "verdanai.ttf", gTrue},
+    {"CCRIKH+Verdana,BoldItalic", nullptr, "verdanaz.ttf", gTrue},
+    {"CCRIKH+Verdana-Bold", nullptr, "verdanab.ttf", gTrue},
+    {"CCRIKH+Verdana-Italic", nullptr, "verdanai.ttf", gTrue},
+    {"CCRIKH+Verdana-BoldItalic", nullptr, "verdanaz.ttf", gTrue},
+
+    {"Georgia", nullptr, "georgia.ttf", gTrue},
+    {"Georgia,Bold", nullptr, "georgiab.ttf", gTrue},
+    {"Georgia,Italic", nullptr, "georgiai.ttf", gTrue},
+    {"Georgia,BoldItalic", nullptr, "georgiaz.ttf", gTrue},
+    {"Georgia-Bold", nullptr, "georgiab.ttf", gTrue},
+    {"Georgia-Italic", nullptr, "georgiai.ttf", gTrue},
+    {"Georgia-BoldItalic", nullptr, "georgiaz.ttf", gTrue},
 
     // fallback for Adobe CID fonts:
-    {"MingLiU", NULL, "mingliu.ttf", gFalse},
-    {"SimSun", NULL, "simsun.ttf", gFalse},
-    {"MS-Mincho", NULL, "msmincho.ttf", gFalse},
-    {"Batang", NULL, "batang.ttf", gFalse},
-    {"ArialUnicode", NULL, "arialuni.ttf", gTrue},
-    {NULL}
+    {"MingLiU", nullptr, "mingliu.ttf", gFalse},
+    {"SimSun", nullptr, "simsun.ttf", gFalse},
+    {"MS-Mincho", nullptr, "msmincho.ttf", gFalse},
+    {"Batang", nullptr, "batang.ttf", gFalse},
+    {"ArialUnicode", nullptr, "arialuni.ttf", gTrue},
+    {nullptr}
 };
 
 #define FONTS_SUBDIR "\\fonts"
@@ -200,14 +200,14 @@ static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen)
         SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPSTR))
                               GetProcAddress(hLib, "SHGetFolderPathA");
         if (SHGetFolderPathFunc)
-            (*SHGetFolderPathFunc)(NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, winFontDir);
+            (*SHGetFolderPathFunc)(nullptr, CSIDL_FONTS, nullptr, SHGFP_TYPE_CURRENT, winFontDir);
 
         if (!winFontDir[0]) {
             // Try an older function
             SHGetSpecialFolderPathFunc = (BOOL (__stdcall *)(HWND, LPSTR, int, BOOL))
                                           GetProcAddress(hLib, "SHGetSpecialFolderPathA");
             if (SHGetSpecialFolderPathFunc)
-                (*SHGetSpecialFolderPathFunc)(NULL, winFontDir, CSIDL_FONTS, FALSE);
+                (*SHGetSpecialFolderPathFunc)(nullptr, winFontDir, CSIDL_FONTS, FALSE);
         }
         FreeLibrary(hLib);
     }
@@ -220,7 +220,7 @@ static void GetWindowsFontDir(char *winFontDir, int cbWinFontDirLen)
         SHGetFolderPathFunc = (HRESULT (__stdcall *)(HWND, int, HANDLE, DWORD, LPSTR))
                               GetProcAddress(hLib, "SHGetFolderPathA");
         if (SHGetFolderPathFunc)
-            (*SHGetFolderPathFunc)(NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, winFontDir);
+            (*SHGetFolderPathFunc)(nullptr, CSIDL_FONTS, nullptr, SHGFP_TYPE_CURRENT, winFontDir);
         FreeLibrary(hLib);
     }
     if (winFontDir[0])
@@ -268,7 +268,7 @@ void SysFontList::scanWindowsFonts(GooString *winFontDir) {
     while (1) {
       valNameLen = sizeof(valName) - 1;
       dataLen = sizeof(data) - 1;
-      if (RegEnumValueA(regKey, idx, valName, &valNameLen, NULL,
+      if (RegEnumValueA(regKey, idx, valName, &valNameLen, nullptr,
 		       &type, (LPBYTE)data, &dataLen) != ERROR_SUCCESS) {
 	break;
       }
@@ -411,7 +411,7 @@ static GooString* replaceSuffix(GooString *path,
 void GlobalParams::setupBaseFonts(char * dir)
 {
     const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR;
-    GooString *fileName = NULL;
+    GooString *fileName = nullptr;
     GooFile *file;
 
     if (baseFontsInitialized)
@@ -462,10 +462,10 @@ void GlobalParams::setupBaseFonts(char * dir)
     // try to open file
     file = GooFile::open(fileName);
 
-    if (file != NULL) {
+    if (file != nullptr) {
       Parser *parser;
-      parser = new Parser(NULL,
-	      new Lexer(NULL,
+      parser = new Parser(nullptr,
+	      new Lexer(nullptr,
 	      new FileStream(file, 0, gFalse, file->size(), Object(objNull))),
 	      gTrue);
       Object obj1 = parser->getObj();
@@ -501,7 +501,7 @@ static const char *findSubstituteName(GfxFont *font, GooHash *fontFiles,
                                       const char *origName)
 {
     assert(origName);
-    if (!origName) return NULL;
+    if (!origName) return nullptr;
     GooString *name2 = new GooString(origName);
     int n = strlen(origName);
     // remove trailing "-Identity-H"
@@ -515,7 +515,7 @@ static const char *findSubstituteName(GfxFont *font, GooHash *fontFiles,
       n -= 11;
     }
     GooString *substName = (GooString *)substFiles->lookup(name2);
-    if (substName != NULL) {
+    if (substName != nullptr) {
       delete name2;
       return substName->getCString();
     }
@@ -525,7 +525,7 @@ static const char *findSubstituteName(GfxFont *font, GooHash *fontFiles,
     if (font->isCIDFont()) {
       GooString *collection = ((GfxCIDFont *)font)->getCollection();
 
-      const char* name3 = NULL;
+      const char* name3 = nullptr;
       if ( !collection->cmp("Adobe-CNS1") )
         name3 = DEFAULT_CID_FONT_AC1_MSWIN;
       else if ( !collection->cmp("Adobe-GB1") )
@@ -552,11 +552,11 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
 					  int *fontNum, GooString *substituteFontName,
                                           GooString *base14Name) {
   SysFontInfo *fi;
-  GooString *path = NULL;
+  GooString *path = nullptr;
   GooString *fontName = font->getName();
-  if (!fontName) return NULL;
+  if (!fontName) return nullptr;
   lockGlobalParams;
-  setupBaseFonts(NULL);
+  setupBaseFonts(nullptr);
 
   // TODO: base14Name should be changed?
   // In the system using FontConfig, findSystemFontFile() uses
@@ -572,7 +572,7 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
     GooString *substFontName = new GooString(findSubstituteName(font, fontFiles,
                                                                 substFiles,
                                                                 fontName->getCString()));
-    GooString *path2 = NULL;
+    GooString *path2 = nullptr;
     error(errSyntaxError, -1, "Couldn't find a font for '{0:t}', subst is '{1:t}'", fontName, substFontName);
     if ((path2 = (GooString *)fontFiles->lookup(substFontName))) {
       path = new GooString(path2);
diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 270b6e43..2f5fec6c 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -141,11 +141,11 @@ Hints::Hints(BaseStream *str, Linearization *linearization, XRef *xref, Security
   memset(numSharedObject, 0, nPages * sizeof(Guint));
   memset(pageObjectNum, 0, nPages * sizeof(int));
 
-  groupLength = NULL;
-  groupOffset = NULL;
-  groupHasSignature = NULL;
-  groupNumObjects = NULL;
-  groupXRefOffset = NULL;
+  groupLength = nullptr;
+  groupOffset = nullptr;
+  groupHasSignature = nullptr;
+  groupNumObjects = nullptr;
+  groupXRefOffset = nullptr;
 
   ok = gTrue;
   readTables(str, linearization, xref, secHdlr);
@@ -209,7 +209,7 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
      (num = obj.getInt(), obj = parser->getObj(), obj.isInt()) &&
      (gen = obj.getInt(), obj = parser->getObj(), obj.isCmd("obj")) &&
      (obj = parser->getObj(gFalse,
-         secHdlr ? secHdlr->getFileKey() : (Guchar *)NULL,
+         secHdlr ? secHdlr->getFileKey() : (Guchar *)nullptr,
          secHdlr ? secHdlr->getEncAlgorithm() : cryptRC4,
          secHdlr ? secHdlr->getFileKeyLength() : 0,
          num, gen, 0, gTrue), obj.isStream())) {
@@ -217,7 +217,7 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
     Dict *hintsDict = obj.streamGetDict();
 
     int sharedStreamOffset = 0;
-    if (hintsDict->lookupInt("S", NULL, &sharedStreamOffset) &&
+    if (hintsDict->lookupInt("S", nullptr, &sharedStreamOffset) &&
         sharedStreamOffset > 0) {
 
         hintsStream->reset();
@@ -307,7 +307,7 @@ GBool Hints::readPageOffsetTable(Stream *str)
   sbr.resetInputBits(); // reset on byte boundary. Not in specs!
   numSharedObject[0] = sbr.readBits(nBitsNumShared);
   numSharedObject[0] = 0; // Do not trust the read value to be 0.
-  sharedObjectId[0] = NULL;
+  sharedObjectId[0] = nullptr;
   for (int i = 1; i < nPages && !sbr.atEOF(); i++) {
     numSharedObject[i] = sbr.readBits(nBitsNumShared);
     if (numSharedObject[i] >= INT_MAX / (int)sizeof(Guint)) {
@@ -457,7 +457,7 @@ Goffset Hints::getPageOffset(int page)
 
 std::vector<ByteRange>* Hints::getPageRanges(int page)
 {
-  if ((page < 1) || (page > nPages)) return NULL;
+  if ((page < 1) || (page > nPages)) return nullptr;
 
   int idx;
   if (page-1 > pageFirst)
diff --git a/poppler/JArithmeticDecoder.cc b/poppler/JArithmeticDecoder.cc
index d23f7ea3..b8bb3b90 100644
--- a/poppler/JArithmeticDecoder.cc
+++ b/poppler/JArithmeticDecoder.cc
@@ -88,7 +88,7 @@ int JArithmeticDecoder::switchTab[47] = {
 };
 
 JArithmeticDecoder::JArithmeticDecoder() {
-  str = NULL;
+  str = nullptr;
   dataLen = 0;
   limitStream = gFalse;
   nBytesRead = 0;
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 90078ec3..89cc9f1a 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -339,7 +339,7 @@ private:
 };
 
 JBIG2HuffmanDecoder::JBIG2HuffmanDecoder() {
-  str = NULL;
+  str = nullptr;
   reset();
 }
 
@@ -482,7 +482,7 @@ private:
 };
 
 JBIG2MMRDecoder::JBIG2MMRDecoder() {
-  str = NULL;
+  str = nullptr;
   reset();
 }
 
@@ -699,7 +699,7 @@ public:
   void combine(JBIG2Bitmap *bitmap, int x, int y, Guint combOp);
   Guchar *getDataPtr() { return data; }
   int getDataSize() { return h * line; }
-  GBool isOk() { return data != NULL; }
+  GBool isOk() { return data != nullptr; }
 
 private:
 
@@ -718,12 +718,12 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA):
 
   if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
     error(errSyntaxError, -1, "invalid width/height");
-    data = NULL;
+    data = nullptr;
     return;
   }
   // need to allocate one extra guard byte for use in combine()
   data = (Guchar *)gmalloc_checkoverflow(h * line + 1);
-  if (data != NULL) {
+  if (data != nullptr) {
     data[h * line] = 0;
   }
 }
@@ -731,10 +731,10 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA):
 JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
   JBIG2Segment(segNumA)
 {
-  if (unlikely(bitmap == NULL)) {
+  if (unlikely(bitmap == nullptr)) {
     error(errSyntaxError, -1, "NULL bitmap in JBIG2Bitmap");
     w = h = line = 0;
-    data = NULL;
+    data = nullptr;
     return;
   }
 
@@ -744,7 +744,7 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
 
   if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
     error(errSyntaxError, -1, "invalid width/height");
-    data = NULL;
+    data = nullptr;
     return;
   }
   // need to allocate one extra guard byte for use in combine()
@@ -778,7 +778,7 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint x, Guint y, Guint wA, Guint hA) {
     }
   } else {
     delete slice;
-    slice = NULL;
+    slice = nullptr;
   }
   return slice;
 }
@@ -787,7 +787,7 @@ void JBIG2Bitmap::expand(int newH, Guint pixel) {
   if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) {
     error(errSyntaxError, -1, "invalid width/height");
     gfree(data);
-    data = NULL;
+    data = nullptr;
     return;
   }
   // need to allocate one extra guard byte for use in combine()
@@ -811,7 +811,7 @@ void JBIG2Bitmap::clearToOne() {
 
 inline void JBIG2Bitmap::getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr) {
   if (y < 0 || y >= h || x >= w) {
-    ptr->p = NULL;
+    ptr->p = nullptr;
     ptr->shift = 0; // make gcc happy
     ptr->x = 0; // make gcc happy
   } else if (x < 0) {
@@ -836,7 +836,7 @@ inline int JBIG2Bitmap::nextPixel(JBIG2BitmapPtr *ptr) {
   } else {
     pix = (*ptr->p >> ptr->shift) & 1;
     if (++ptr->x == w) {
-      ptr->p = NULL;
+      ptr->p = nullptr;
     } else if (ptr->shift == 0) {
       ++ptr->p;
       ptr->shift = 7;
@@ -1057,7 +1057,7 @@ public:
   Guint getSize() { return size; }
   void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; }
   JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; }
-  GBool isOk() { return bitmaps != NULL; }
+  GBool isOk() { return bitmaps != nullptr; }
   void setGenericRegionStats(JArithmeticDecoderStats *stats)
     { genericRegionStats = stats; }
   void setRefinementRegionStats(JArithmeticDecoderStats *stats)
@@ -1084,10 +1084,10 @@ JBIG2SymbolDict::JBIG2SymbolDict(Guint segNumA, Guint sizeA):
   bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(size, sizeof(JBIG2Bitmap *));
   if (!bitmaps) size = 0;
   for (i = 0; i < size; ++i) {
-    bitmaps[i] = NULL;
+    bitmaps[i] = nullptr;
   }
-  genericRegionStats = NULL;
-  refinementRegionStats = NULL;
+  genericRegionStats = nullptr;
+  refinementRegionStats = nullptr;
 }
 
 JBIG2SymbolDict::~JBIG2SymbolDict() {
@@ -1117,7 +1117,7 @@ public:
   JBIG2SegmentType getType() override { return jbig2SegPatternDict; }
   Guint getSize() { return size; }
   void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { if (likely(idx < size)) bitmaps[idx] = bitmap; }
-  JBIG2Bitmap *getBitmap(Guint idx) { return (idx < size) ? bitmaps[idx] : NULL; }
+  JBIG2Bitmap *getBitmap(Guint idx) { return (idx < size) ? bitmaps[idx] : nullptr; }
 
 private:
 
@@ -1180,7 +1180,7 @@ JBIG2CodeTable::~JBIG2CodeTable() {
 JBIG2Stream::JBIG2Stream(Stream *strA, Object *globalsStreamA, Object *globalsStreamRefA):
   FilterStream(strA)
 {
-  pageBitmap = NULL;
+  pageBitmap = nullptr;
 
   arithDecoder = new JArithmeticDecoder();
   genericRegionStats = new JArithmeticDecoderStats(1 << 1);
@@ -1208,9 +1208,9 @@ JBIG2Stream::JBIG2Stream(Stream *strA, Object *globalsStreamA, Object *globalsSt
       globalsStreamRef = globalsStreamRefA->getRef();
   }
 
-  segments = globalSegments = NULL;
-  curStr = NULL;
-  dataPtr = dataEnd = NULL;
+  segments = globalSegments = nullptr;
+  curStr = nullptr;
+  dataPtr = dataEnd = nullptr;
 }
 
 JBIG2Stream::~JBIG2Stream() {
@@ -1264,24 +1264,24 @@ void JBIG2Stream::reset() {
     dataPtr = pageBitmap->getDataPtr();
     dataEnd = dataPtr + pageBitmap->getDataSize();
   } else {
-    dataPtr = dataEnd = NULL;
+    dataPtr = dataEnd = nullptr;
   }
 }
 
 void JBIG2Stream::close() {
   if (pageBitmap) {
     delete pageBitmap;
-    pageBitmap = NULL;
+    pageBitmap = nullptr;
   }
   if (segments) {
     deleteGooList(segments, JBIG2Segment);
-    segments = NULL;
+    segments = nullptr;
   }
   if (globalSegments) {
     deleteGooList(globalSegments, JBIG2Segment);
-    globalSegments = NULL;
+    globalSegments = nullptr;
   }
-  dataPtr = dataEnd = NULL;
+  dataPtr = dataEnd = nullptr;
   FilterStream::close();
 }
 
@@ -1300,7 +1300,7 @@ int JBIG2Stream::lookChar() {
 }
 
 Goffset JBIG2Stream::getPos() {
-  if (pageBitmap == NULL) {
+  if (pageBitmap == nullptr) {
     return 0;
   }
   return dataPtr - pageBitmap->getDataPtr();
@@ -1324,7 +1324,7 @@ int JBIG2Stream::getChars(int nChars, Guchar *buffer) {
 }
 
 GooString *JBIG2Stream::getPSFilter(int psLevel, const char *indent) {
-  return NULL;
+  return nullptr;
 }
 
 GBool JBIG2Stream::isBinary(GBool last) {
@@ -1569,7 +1569,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
   Guint i, j, k;
   Guchar *p;
 
-  symWidths = NULL;
+  symWidths = nullptr;
 
   // symbol dictionary flags
   if (!readUWord(&flags)) {
@@ -1676,13 +1676,13 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
     goto eofError;
   }
   for (i = 0; i < numInputSyms + numNewSyms; ++i) {
-    bitmaps[i] = NULL;
+    bitmaps[i] = nullptr;
   }
   k = 0;
-  inputSymbolDict = NULL;
+  inputSymbolDict = nullptr;
   for (i = 0; i < nRefSegs; ++i) {
     seg = findSegment(refSegs[i]);
-    if (seg != NULL && seg->getType() == jbig2SegSymbolDict) {
+    if (seg != nullptr && seg->getType() == jbig2SegSymbolDict) {
       inputSymbolDict = (JBIG2SymbolDict *)seg;
       for (j = 0; j < inputSymbolDict->getSize(); ++j) {
 	bitmaps[k++] = inputSymbolDict->getBitmap(j);
@@ -1691,8 +1691,8 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
   }
 
   // get the Huffman tables
-  huffDHTable = huffDWTable = NULL; // make gcc happy
-  huffBMSizeTable = huffAggInstTable = NULL; // make gcc happy
+  huffDHTable = huffDWTable = nullptr; // make gcc happy
+  huffBMSizeTable = huffAggInstTable = nullptr; // make gcc happy
   i = 0;
   if (huff) {
     if (huffDH == 0) {
@@ -1745,7 +1745,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
     if (contextUsed && inputSymbolDict) {
       resetGenericStats(sdTemplate, inputSymbolDict->getGenericRegionStats());
     } else {
-      resetGenericStats(sdTemplate, NULL);
+      resetGenericStats(sdTemplate, nullptr);
     }
     resetIntStats(symCodeLen);
     arithDecoder->start();
@@ -1757,7 +1757,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
       resetRefinementStats(sdrTemplate,
 			   inputSymbolDict->getRefinementRegionStats());
     } else {
-      resetRefinementStats(sdrTemplate, NULL);
+      resetRefinementStats(sdrTemplate, nullptr);
     }
   }
 
@@ -1852,7 +1852,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
 	    goto syntaxError;
 	  }
 	  refBitmap = bitmaps[symID];
-	  if (unlikely(refBitmap == NULL)) {
+	  if (unlikely(refBitmap == nullptr)) {
 	    error(errSyntaxError, curStr->getPos(), "Invalid ref bitmap for symbol ID {0:ud} in JBIG2 symbol dictionary", symID);
 	    goto syntaxError;
 	  }
@@ -1865,7 +1865,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
 	} else {
 	  bitmaps[numInputSyms + i] =
 	      readTextRegion(huff, gTrue, symWidth, symHeight,
-			     refAggNum, 0, numInputSyms + i, NULL,
+			     refAggNum, 0, numInputSyms + i, nullptr,
 			     symCodeLen, bitmaps, 0, 0, 0, 1, 0,
 			     huffTableF, huffTableH, huffTableK, huffTableO,
 			     huffTableO, huffTableO, huffTableO, huffTableA,
@@ -1876,7 +1876,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
       } else {
 	bitmaps[numInputSyms + i] =
 	    readGenericBitmap(gFalse, symWidth, symHeight,
-			      sdTemplate, gFalse, gFalse, NULL,
+			      sdTemplate, gFalse, gFalse, nullptr,
 			      sdATX, sdATY, 0);
       }
 
@@ -1891,7 +1891,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
 	collBitmap = new JBIG2Bitmap(0, totalWidth, symHeight);
 	bmSize = symHeight * ((totalWidth + 7) >> 3);
 	p = collBitmap->getDataPtr();
-	if (unlikely(p == NULL)) {
+	if (unlikely(p == nullptr)) {
 	  delete collBitmap;
 	  goto syntaxError;
 	}
@@ -1903,10 +1903,10 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
 	}
       } else {
 	collBitmap = readGenericBitmap(gTrue, totalWidth, symHeight,
-				       0, gFalse, gFalse, NULL, NULL, NULL,
+				       0, gFalse, gFalse, nullptr, nullptr, nullptr,
 				       bmSize);
       }
-      if (likely(collBitmap != NULL)) {
+      if (likely(collBitmap != nullptr)) {
 	x = 0;
 	for (; j < i; ++j) {
 	  bitmaps[numInputSyms + j] =
@@ -1940,7 +1940,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
     if (i + run > numInputSyms + numNewSyms ||
 	(ex && j + run > numExSyms)) {
       error(errSyntaxError, curStr->getPos(), "Too many exported symbols in JBIG2 symbol dictionary");
-      for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL);
+      for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, nullptr);
       delete symbolDict;
       goto syntaxError;
     }
@@ -1955,7 +1955,7 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
   }
   if (j != numExSyms) {
     error(errSyntaxError, curStr->getPos(), "Too few symbols in JBIG2 symbol dictionary");
-    for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL);
+    for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, nullptr);
     delete symbolDict;
     goto syntaxError;
   }
@@ -2119,9 +2119,9 @@ void JBIG2Stream::readTextRegionSeg(Guint segNum, GBool imm,
   }
 
   // get the Huffman tables
-  huffFSTable = huffDSTable = huffDTTable = NULL; // make gcc happy
-  huffRDWTable = huffRDHTable = NULL; // make gcc happy
-  huffRDXTable = huffRDYTable = huffRSizeTable = NULL; // make gcc happy
+  huffFSTable = huffDSTable = huffDTTable = nullptr; // make gcc happy
+  huffRDWTable = huffRDHTable = nullptr; // make gcc happy
+  huffRDXTable = huffRDYTable = huffRSizeTable = nullptr; // make gcc happy
   i = 0;
   if (huff) {
     if (huffFS == 0) {
@@ -2260,12 +2260,12 @@ void JBIG2Stream::readTextRegionSeg(Guint segNum, GBool imm,
 
   // set up the arithmetic decoder
   } else {
-    symCodeTab = NULL;
+    symCodeTab = nullptr;
     resetIntStats(symCodeLen);
     arithDecoder->start();
   }
   if (refine) {
-    resetRefinementStats(templ, NULL);
+    resetRefinementStats(templ, nullptr);
   }
 
   bitmap = readTextRegion(huff, refine, w, h, numInstances,
@@ -2346,7 +2346,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
   bitmap = new JBIG2Bitmap(0, w, h);
   if (!bitmap->isOk()) {
     delete bitmap;
-    return NULL;
+    return nullptr;
   }
   if (defPixel) {
     bitmap->clearToOne();
@@ -2415,12 +2415,12 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 	if (unlikely(numInstances - inst > 0x800)) {
 	  // don't loop too often with damaged JBIg2 streams
 	  delete bitmap;
-	  return NULL;
+	  return nullptr;
 	}
       } else {
 
 	// get the symbol bitmap
-	symbolBitmap = NULL;
+	symbolBitmap = nullptr;
 	if (refine) {
 	  if (huff) {
 	    ri = (int)huffDecoder->readBit();
@@ -2474,7 +2474,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 	      delete symbolBitmap;
 	    }
 	    delete bitmap;
-	    return NULL;
+	    return nullptr;
 	  }
 	  bh = symbolBitmap->getHeight() - 1;
 	  if (transposed) {
@@ -2484,7 +2484,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 	        delete symbolBitmap;
 	      }
 	      delete bitmap;
-	      return NULL;
+	      return nullptr;
 	    }
 	    switch (refCorner) {
 	    case 0: // bottom left
@@ -2510,7 +2510,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 		  delete symbolBitmap;
 		}
 		delete bitmap;
-		return NULL;
+		return nullptr;
 	      }
 	      bitmap->combine(symbolBitmap, s, tt - bh, combOp);
 	      break;
@@ -2521,7 +2521,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 		  delete symbolBitmap;
 		}
 		delete bitmap;
-		return NULL;
+		return nullptr;
 	      }
 	      bitmap->combine(symbolBitmap, s, tt, combOp);
 	      break;
@@ -2532,7 +2532,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 		  delete symbolBitmap;
 		}
 		delete bitmap;
-		return NULL;
+		return nullptr;
 	      }
 	      bitmap->combine(symbolBitmap, s, tt - bh, combOp);
 	      break;
@@ -2543,7 +2543,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 		  delete symbolBitmap;
 		}
 		delete bitmap;
-		return NULL;
+		return nullptr;
 	      }
 	      bitmap->combine(symbolBitmap, s, tt, combOp);
 	      break;
@@ -2556,7 +2556,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
 	} else {
 	  // NULL symbolBitmap only happens on error
 	  delete bitmap;
-	  return NULL;
+	  return nullptr;
 	}
       }
 
@@ -2599,7 +2599,7 @@ void JBIG2Stream::readPatternDictSeg(Guint segNum, Guint length) {
 
   // set up the arithmetic decoder
   if (!mmr) {
-    resetGenericStats(templ, NULL);
+    resetGenericStats(templ, nullptr);
     arithDecoder->start();
   }
 
@@ -2609,7 +2609,7 @@ void JBIG2Stream::readPatternDictSeg(Guint segNum, Guint length) {
   atx[2] =  2;             aty[2] = -2;
   atx[3] = -2;             aty[3] = -2;
   bitmap = readGenericBitmap(mmr, (grayMax + 1) * patternW, patternH,
-			     templ, gFalse, gFalse, NULL,
+			     templ, gFalse, gFalse, nullptr,
 			     atx, aty, length - 7);
 
   if (!bitmap)
@@ -2690,7 +2690,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
     return;
   }
   seg = findSegment(refSegs[0]);
-  if (seg == NULL || seg->getType() != jbig2SegPatternDict) {
+  if (seg == nullptr || seg->getType() != jbig2SegPatternDict) {
     error(errSyntaxError, curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
     return;
   }
@@ -2709,7 +2709,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
     }
   }
   patternBitmap = patternDict->getBitmap(0);
-  if (unlikely(patternBitmap == NULL)) {
+  if (unlikely(patternBitmap == nullptr)) {
     error(errSyntaxError, curStr->getPos(), "Bad pattern bitmap");
     return;
   }
@@ -2718,7 +2718,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
 
   // set up the arithmetic decoder
   if (!mmr) {
-    resetGenericStats(templ, NULL);
+    resetGenericStats(templ, nullptr);
     arithDecoder->start();
   }
 
@@ -2731,7 +2731,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
   }
 
   // compute the skip bitmap
-  skipBitmap = NULL;
+  skipBitmap = nullptr;
   if (enableSkip) {
     skipBitmap = new JBIG2Bitmap(0, gridW, gridH);
     skipBitmap->clearToZero();
@@ -2776,7 +2776,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
     for (n = 0; n < gridW; ++n) {
       if (!(enableSkip && skipBitmap->getPixel(n, m))) {
 	patternBitmap = patternDict->getBitmap(grayImg[i]);
-	if (unlikely(patternBitmap == NULL)) {
+	if (unlikely(patternBitmap == nullptr)) {
 	  delete skipBitmap;
 	  delete bitmap;
 	  gfree(grayImg);
@@ -2861,13 +2861,13 @@ void JBIG2Stream::readGenericRegionSeg(Guint segNum, GBool imm,
 
   // set up the arithmetic decoder
   if (!mmr) {
-    resetGenericStats(templ, NULL);
+    resetGenericStats(templ, nullptr);
     arithDecoder->start();
   }
 
   // read the bitmap
   bitmap = readGenericBitmap(mmr, w, h, templ, tpgdOn, gFalse,
-			     NULL, atx, aty, mmr ? length - 18 : 0);
+			     nullptr, atx, aty, mmr ? length - 18 : 0);
   if (!bitmap)
     return;
 
@@ -2955,7 +2955,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
   bitmap = new JBIG2Bitmap(0, w, h);
   if (!bitmap->isOk()) {
     delete bitmap;
-    return NULL;
+    return nullptr;
   }
   bitmap->clearToZero();
 
@@ -2967,7 +2967,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
     if (w > INT_MAX - 2) {
       error(errSyntaxError, curStr->getPos(), "Bad width in JBIG2 generic bitmap");
       delete bitmap;
-      return NULL;
+      return nullptr;
     }
     // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = w
     // ---> max codingLine size = w + 1
@@ -3226,11 +3226,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize();
 	    buf0 = *p0++ << 8;
 	  } else {
-	    p0 = NULL;
+	    p0 = nullptr;
 	    buf0 = 0;
 	  }
 	} else {
-	  p1 = p0 = NULL;
+	  p1 = p0 = nullptr;
 	  buf1 = buf0 = 0;
 	}
 
@@ -3243,7 +3243,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize();
 	    atBuf0 = *atP0++ << 8;
 	  } else {
-	    atP0 = NULL;
+	    atP0 = nullptr;
 	    atBuf0 = 0;
 	  }
 	  atShift0 = 15 - atx[0];
@@ -3251,7 +3251,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP1 = bitmap->getDataPtr() + (y + aty[1]) * bitmap->getLineSize();
 	    atBuf1 = *atP1++ << 8;
 	  } else {
-	    atP1 = NULL;
+	    atP1 = nullptr;
 	    atBuf1 = 0;
 	  }
 	  atShift1 = 15 - atx[1];
@@ -3259,7 +3259,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP2 = bitmap->getDataPtr() + (y + aty[2]) * bitmap->getLineSize();
 	    atBuf2 = *atP2++ << 8;
 	  } else {
-	    atP2 = NULL;
+	    atP2 = nullptr;
 	    atBuf2 = 0;
 	  }
 	  atShift2 = 15 - atx[2];
@@ -3267,7 +3267,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP3 = bitmap->getDataPtr() + (y + aty[3]) * bitmap->getLineSize();
 	    atBuf3 = *atP3++ << 8;
 	  } else {
-	    atP3 = NULL;
+	    atP3 = nullptr;
 	    atBuf3 = 0;
 	  }
 	  atShift3 = 15 - atx[3];
@@ -3395,11 +3395,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize();
 	    buf0 = *p0++ << 8;
 	  } else {
-	    p0 = NULL;
+	    p0 = nullptr;
 	    buf0 = 0;
 	  }
 	} else {
-	  p1 = p0 = NULL;
+	  p1 = p0 = nullptr;
 	  buf1 = buf0 = 0;
 	}
 
@@ -3410,7 +3410,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize();
 	    atBuf0 = *atP0++ << 8;
 	  } else {
-	    atP0 = NULL;
+	    atP0 = nullptr;
 	    atBuf0 = 0;
 	  }
 	  atShift0 = 15 - atx[0];
@@ -3511,11 +3511,11 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize();
 	    buf0 = *p0++ << 8;
 	  } else {
-	    p0 = NULL;
+	    p0 = nullptr;
 	    buf0 = 0;
 	  }
 	} else {
-	  p1 = p0 = NULL;
+	  p1 = p0 = nullptr;
 	  buf1 = buf0 = 0;
 	}
 
@@ -3526,7 +3526,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize();
 	    atBuf0 = *atP0++ << 8;
 	  } else {
-	    atP0 = NULL;
+	    atP0 = nullptr;
 	    atBuf0 = 0;
 	  }
 	  atShift0 = 15 - atx[0];
@@ -3624,7 +3624,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	  p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize();
 	  buf1 = *p1++ << 8;
 	} else {
-	  p1 = NULL;
+	  p1 = nullptr;
 	  buf1 = 0;
 	}
 
@@ -3635,7 +3635,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
 	    atP0 = bitmap->getDataPtr() + atY * bitmap->getLineSize();
 	    atBuf0 = *atP0++ << 8;
 	  } else {
-	    atP0 = NULL;
+	    atP0 = nullptr;
 	    atBuf0 = 0;
 	  }
 	  atShift0 = 15 - atx[0];
@@ -3767,7 +3767,7 @@ void JBIG2Stream::readGenericRefinementRegionSeg(Guint segNum, GBool imm,
   }
   if (nRefSegs == 1) {
     seg = findSegment(refSegs[0]);
-    if (seg == NULL || seg->getType() != jbig2SegBitmap) {
+    if (seg == nullptr || seg->getType() != jbig2SegBitmap) {
       error(errSyntaxError, curStr->getPos(), "Bad bitmap reference in JBIG2 generic refinement segment");
       return;
     }
@@ -3777,7 +3777,7 @@ void JBIG2Stream::readGenericRefinementRegionSeg(Guint segNum, GBool imm,
   }
 
   // set up the arithmetic decoder
-  resetRefinementStats(templ, NULL);
+  resetRefinementStats(templ, nullptr);
   arithDecoder->start();
 
   // read
@@ -3820,16 +3820,16 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
   JBIG2Bitmap *bitmap;
   GBool ltp;
   Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2;
-  JBIG2BitmapPtr cxPtr0 = {0};
-  JBIG2BitmapPtr cxPtr1 = {0};
-  JBIG2BitmapPtr cxPtr2 = {0};
-  JBIG2BitmapPtr cxPtr3 = {0};
-  JBIG2BitmapPtr cxPtr4 = {0};
-  JBIG2BitmapPtr cxPtr5 = {0};
-  JBIG2BitmapPtr cxPtr6 = {0};
-  JBIG2BitmapPtr tpgrCXPtr0 = {0};
-  JBIG2BitmapPtr tpgrCXPtr1 = {0};
-  JBIG2BitmapPtr tpgrCXPtr2 = {0};
+  JBIG2BitmapPtr cxPtr0 = {nullptr};
+  JBIG2BitmapPtr cxPtr1 = {nullptr};
+  JBIG2BitmapPtr cxPtr2 = {nullptr};
+  JBIG2BitmapPtr cxPtr3 = {nullptr};
+  JBIG2BitmapPtr cxPtr4 = {nullptr};
+  JBIG2BitmapPtr cxPtr5 = {nullptr};
+  JBIG2BitmapPtr cxPtr6 = {nullptr};
+  JBIG2BitmapPtr tpgrCXPtr0 = {nullptr};
+  JBIG2BitmapPtr tpgrCXPtr1 = {nullptr};
+  JBIG2BitmapPtr tpgrCXPtr2 = {nullptr};
   int x, y, pix;
 
   if (!refBitmap) {
@@ -3840,7 +3840,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
   if (!bitmap->isOk())
   {
     delete bitmap;
-    return NULL;
+    return nullptr;
   }
   bitmap->clearToZero();
 
@@ -3883,7 +3883,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
 	tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
 	tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
       } else {
-	tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = NULL; // make gcc happy
+	tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = nullptr; // make gcc happy
 	tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0;
 	tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0;
       }
@@ -3958,7 +3958,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
 	tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
 	tpgrCX2 = (tpgrCX2 << 1) | refBitmap->nextPixel(&tpgrCXPtr2);
       } else {
-	tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = NULL; // make gcc happy
+	tpgrCXPtr0.p = tpgrCXPtr1.p = tpgrCXPtr2.p = nullptr; // make gcc happy
 	tpgrCXPtr0.shift = tpgrCXPtr1.shift = tpgrCXPtr2.shift = 0;
 	tpgrCXPtr0.x = tpgrCXPtr1.x = tpgrCXPtr2.x = 0;
       }
@@ -4028,7 +4028,7 @@ void JBIG2Stream::readPageInfoSeg(Guint length) {
 
   if (!pageBitmap->isOk()) {
     delete pageBitmap;
-    pageBitmap = NULL;
+    pageBitmap = nullptr;
     return;
   }
   
@@ -4158,7 +4158,7 @@ JBIG2Segment *JBIG2Stream::findSegment(Guint segNum) {
       return seg;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 void JBIG2Stream::discardSegment(Guint segNum) {
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index 078465a0..93793d16 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -78,7 +78,7 @@ static inline int doGetChar(JPXStreamPrivate* priv) {
 JPXStream::JPXStream(Stream *strA) : FilterStream(strA) {
   priv = new JPXStreamPrivate;
   priv->inited = gFalse;
-  priv->image = NULL;
+  priv->image = nullptr;
   priv->npixels = 0;
   priv->ncomps = 0;
   priv->indexed = gFalse;
@@ -96,9 +96,9 @@ void JPXStream::reset() {
 }
 
 void JPXStream::close() {
-  if (priv->image != NULL) {
+  if (priv->image != nullptr) {
     opj_image_destroy(priv->image);
-    priv->image = NULL;
+    priv->image = nullptr;
     priv->npixels = 0;
   }
 }
@@ -131,7 +131,7 @@ int JPXStream::lookChar() {
 }
 
 GooString *JPXStream::getPSFilter(int psLevel, const char *indent) {
-  return NULL;
+  return nullptr;
 }
 
 GBool JPXStream::isBinary(GBool last) {
@@ -250,7 +250,7 @@ void JPXStream::init()
     priv->ncomps = priv->image->numcomps;
     if (alpha == 1 && priv->smaskInData == 0) priv->ncomps--;
     for (int component = 0; component < priv->ncomps; component++) {
-      if (priv->image->comps[component].data == NULL) {
+      if (priv->image->comps[component].data == nullptr) {
         close();
         break;
       }
@@ -289,7 +289,7 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
   stream = opj_stream_default_create(OPJ_TRUE);
 
 #if OPENJPEG_VERSION >= OPENJPEG_VERSION_ENCODE(2, 1, 0)
-  opj_stream_set_user_data (stream, &jpxData, NULL);
+  opj_stream_set_user_data (stream, &jpxData, nullptr);
 #else
   opj_stream_set_user_data (stream, &jpxData);
 #endif
@@ -310,14 +310,14 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
 
   /* Get the decoder handle of the format */
   decoder = opj_create_decompress(format);
-  if (decoder == NULL) {
+  if (decoder == nullptr) {
     error(errSyntaxWarning, -1, "Unable to create decoder");
     goto error;
   }
 
   /* Catch events using our callbacks */
-  opj_set_warning_handler(decoder, libopenjpeg_warning_callback, NULL);
-  opj_set_error_handler(decoder, libopenjpeg_error_callback, NULL);
+  opj_set_warning_handler(decoder, libopenjpeg_warning_callback, nullptr);
+  opj_set_error_handler(decoder, libopenjpeg_error_callback, nullptr);
 
   /* Setup the decoder decoding parameters */
   if (!opj_setup_decoder(decoder, &parameters)) {
@@ -326,7 +326,7 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
   }
 
   /* Decode the stream and fill the image structure */
-  image = NULL;
+  image = nullptr;
   if (!opj_read_header(stream, decoder, &image)) {
     error(errSyntaxWarning, -1, "Unable to read header");
     goto error;
@@ -348,7 +348,7 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
   opj_destroy_codec(decoder);
   opj_stream_destroy(stream);
 
-  if (image != NULL)
+  if (image != nullptr)
     return;
 
 error:
diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc
index d2329b53..70e00539 100644
--- a/poppler/Lexer.cc
+++ b/poppler/Lexer.cc
@@ -279,7 +279,7 @@ Object Lexer::getObj(int objNum) {
     n = 0;
     numParen = 1;
     done = gFalse;
-    s = NULL;
+    s = nullptr;
     do {
       c2 = EOF;
       switch (c = getChar()) {
@@ -376,7 +376,7 @@ Object Lexer::getObj(int objNum) {
 	  n = 0;
 	  
 	  // we are growing see if the document is not malformed and we are growing too much
-	  if (objNum > 0 && xref != NULL)
+	  if (objNum > 0 && xref != nullptr)
 	  {
 	    int newObjNum = xref->getNumEntry(curStr.streamGetPos());
 	    if (newObjNum != objNum)
@@ -407,7 +407,7 @@ Object Lexer::getObj(int objNum) {
   case '/':
     p = tokBuf;
     n = 0;
-    s = NULL;
+    s = nullptr;
     while ((c = lookChar()) != EOF && !specialChars[c]) {
       getChar();
       if (c == '#') {
@@ -483,7 +483,7 @@ Object Lexer::getObj(int objNum) {
       p = tokBuf;
       m = n = 0;
       c2 = 0;
-      s = NULL;
+      s = nullptr;
       while (1) {
 	c = getChar();
 	if (c == '>') {
diff --git a/poppler/Linearization.cc b/poppler/Linearization.cc
index 49008a31..8886894f 100644
--- a/poppler/Linearization.cc
+++ b/poppler/Linearization.cc
@@ -23,8 +23,8 @@ Linearization::Linearization (BaseStream *str)
   Parser *parser;
 
   str->reset();
-  parser = new Parser(NULL,
-      new Lexer(NULL, str->makeSubStream(str->getStart(), gFalse, 0, Object(objNull))),
+  parser = new Parser(nullptr,
+      new Lexer(nullptr, str->makeSubStream(str->getStart(), gFalse, 0, Object(objNull))),
       gFalse);
   Object obj1 = parser->getObj();
   Object obj2 = parser->getObj();
@@ -48,7 +48,7 @@ Guint Linearization::getLength()
   if (!linDict.isDict()) return 0;
 
   int length;
-  if (linDict.getDict()->lookupInt("L", NULL, &length) &&
+  if (linDict.getDict()->lookupInt("L", nullptr, &length) &&
       length > 0) {
     return length;
   } else {
@@ -139,7 +139,7 @@ int Linearization::getObjectNumberFirst()
 {
   int objectNumberFirst = 0;
   if (linDict.isDict() &&
-      linDict.getDict()->lookupInt("O", NULL, &objectNumberFirst) &&
+      linDict.getDict()->lookupInt("O", nullptr, &objectNumberFirst) &&
       objectNumberFirst > 0) {
     return objectNumberFirst;
   } else {
@@ -152,7 +152,7 @@ Guint Linearization::getEndFirst()
 {
   int pageEndFirst = 0;
   if (linDict.isDict() &&
-      linDict.getDict()->lookupInt("E", NULL, &pageEndFirst) &&
+      linDict.getDict()->lookupInt("E", nullptr, &pageEndFirst) &&
       pageEndFirst > 0) {
     return pageEndFirst;
   } else {
@@ -165,7 +165,7 @@ int Linearization::getNumPages()
 {
   int numPages = 0;
   if (linDict.isDict() &&
-      linDict.getDict()->lookupInt("N", NULL, &numPages) &&
+      linDict.getDict()->lookupInt("N", nullptr, &numPages) &&
       numPages > 0) {
     return numPages;
   } else {
@@ -178,7 +178,7 @@ Guint Linearization::getMainXRefEntriesOffset()
 {
   int mainXRefEntriesOffset = 0;
   if (linDict.isDict() &&
-      linDict.getDict()->lookupInt("T", NULL, &mainXRefEntriesOffset) &&
+      linDict.getDict()->lookupInt("T", nullptr, &mainXRefEntriesOffset) &&
       mainXRefEntriesOffset > 0) {
     return mainXRefEntriesOffset;
   } else {
@@ -192,7 +192,7 @@ int Linearization::getPageFirst()
   int pageFirst = 0; // Optional, defaults to 0.
 
   if (linDict.isDict()) {
-    linDict.getDict()->lookupInt("P", NULL, &pageFirst);
+    linDict.getDict()->lookupInt("P", nullptr, &pageFirst);
   }
 
   if ((pageFirst < 0) || (pageFirst >= getNumPages())) {
diff --git a/poppler/Link.cc b/poppler/Link.cc
index a927c214..1bf57289 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -57,7 +57,7 @@ LinkAction *LinkAction::parseDest(Object *obj) {
   action = new LinkGoTo(obj);
   if (!action->isOk()) {
     delete action;
-    return NULL;
+    return nullptr;
   }
   return action;
 }
@@ -68,7 +68,7 @@ LinkAction *LinkAction::parseAction(Object *obj, GooString *baseURI) {
   if (!obj->isDict()) {
       error(errSyntaxWarning, -1, "parseAction: Bad annotation action for URI '{0:s}'",
             baseURI ? baseURI->getCString() : "NULL");
-      return NULL;
+      return nullptr;
   }
 
   Object obj2 = obj->dictLookup("S");
@@ -127,12 +127,12 @@ LinkAction *LinkAction::parseAction(Object *obj, GooString *baseURI) {
   } else {
     error(errSyntaxWarning, -1, "parseAction: Unknown annotation action object: URI = '{0:s}'",
           baseURI ? baseURI->getCString() : "NULL");
-    action = NULL;
+    action = nullptr;
   }
 
   if (action && !action->isOk()) {
     delete action;
-    return NULL;
+    return nullptr;
   }
   return action;
 }
@@ -362,8 +362,8 @@ LinkDest::LinkDest(LinkDest *dest) {
 //------------------------------------------------------------------------
 
 LinkGoTo::LinkGoTo(Object *destObj) {
-  dest = NULL;
-  namedDest = NULL;
+  dest = nullptr;
+  namedDest = nullptr;
 
   // named destination
   if (destObj->isName()) {
@@ -376,7 +376,7 @@ LinkGoTo::LinkGoTo(Object *destObj) {
     dest = new LinkDest(destObj->getArray());
     if (!dest->isOk()) {
       delete dest;
-      dest = NULL;
+      dest = nullptr;
     }
 
   // error
@@ -397,9 +397,9 @@ LinkGoTo::~LinkGoTo() {
 //------------------------------------------------------------------------
 
 LinkGoToR::LinkGoToR(Object *fileSpecObj, Object *destObj) {
-  fileName = NULL;
-  dest = NULL;
-  namedDest = NULL;
+  fileName = nullptr;
+  dest = nullptr;
+  namedDest = nullptr;
 
   // get file name
   Object obj1 = getFileSpecNameForPlatform (fileSpecObj);
@@ -418,7 +418,7 @@ LinkGoToR::LinkGoToR(Object *fileSpecObj, Object *destObj) {
     dest = new LinkDest(destObj->getArray());
     if (!dest->isOk()) {
       delete dest;
-      dest = NULL;
+      dest = nullptr;
     }
 
   // error
@@ -443,8 +443,8 @@ LinkGoToR::~LinkGoToR() {
 
 LinkLaunch::LinkLaunch(Object *actionObj) {
 
-  fileName = NULL;
-  params = NULL;
+  fileName = nullptr;
+  params = nullptr;
 
   if (actionObj->isDict()) {
     Object obj1 = actionObj->dictLookup("F");
@@ -494,7 +494,7 @@ LinkURI::LinkURI(Object *uriObj, GooString *baseURI) {
   int n;
   char c;
 
-  uri = NULL;
+  uri = nullptr;
   if (uriObj->isString()) {
     uri2 = uriObj->getString();
     n = (int)strcspn(uri2->getCString(), "/:");
@@ -539,7 +539,7 @@ LinkURI::~LinkURI() {
 //------------------------------------------------------------------------
 
 LinkNamed::LinkNamed(Object *nameObj) {
-  name = NULL;
+  name = nullptr;
   if (nameObj->isName()) {
     name = new GooString(nameObj->getName());
   }
@@ -557,7 +557,7 @@ LinkNamed::~LinkNamed() {
 
 LinkMovie::LinkMovie(Object *obj) {
   annotRef.num = -1;
-  annotTitle = NULL;
+  annotTitle = nullptr;
 
   Object tmp = obj->dictLookupNF("Annotation");
   if (tmp.isRef()) {
@@ -569,7 +569,7 @@ LinkMovie::LinkMovie(Object *obj) {
     annotTitle = tmp.getString()->copy();
   }
 
-  if ((annotTitle == NULL) && (annotRef.num == -1)) {
+  if ((annotTitle == nullptr) && (annotRef.num == -1)) {
     error(errSyntaxError, -1,
 	  "Movie action is missing both the Annot and T keys");
   }
@@ -608,7 +608,7 @@ LinkSound::LinkSound(Object *soundObj) {
   sync = gFalse;
   repeat = gFalse;
   mix = gFalse;
-  sound = NULL;
+  sound = nullptr;
   if (soundObj->isDict())
   {
     // volume
@@ -647,8 +647,8 @@ LinkSound::~LinkSound() {
 
 LinkRendition::LinkRendition(Object *obj) {
   operation = NoRendition;
-  media = NULL;
-  js = NULL;
+  media = nullptr;
+  js = nullptr;
   int operationCode = -1;
 
   if (obj->isDict()) {
@@ -723,7 +723,7 @@ LinkRendition::~LinkRendition() {
 //------------------------------------------------------------------------
 
 LinkJavaScript::LinkJavaScript(Object *jsObj) {
-  js = NULL;
+  js = nullptr;
 
   if (jsObj->isString()) {
     js = new GooString(jsObj->getString());
@@ -750,7 +750,7 @@ LinkOCGState::LinkOCGState(Object *obj) {
 
   Object obj1 = obj->dictLookup("State");
   if (obj1.isArray()) {
-    StateList *stList = NULL;
+    StateList *stList = nullptr;
 
     for (int i = 0; i < obj1.arrayGetLength(); ++i) {
       Object obj2 = obj1.arrayGetNF(i);
@@ -770,7 +770,7 @@ LinkOCGState::LinkOCGState(Object *obj) {
 	} else {
 	  error(errSyntaxWarning, -1, "Invalid name '{0:s}' in OCG Action state array", name);
 	  delete stList;
-	  stList = NULL;
+	  stList = nullptr;
 	}
       } else if (obj2.isRef()) {
         if (stList) {
@@ -792,7 +792,7 @@ LinkOCGState::LinkOCGState(Object *obj) {
   } else {
     error(errSyntaxWarning, -1, "Invalid OCGState action");
     delete stateList;
-    stateList = NULL;
+    stateList = nullptr;
   }
 
   obj1 = obj->dictLookup("PreserveRB");
@@ -831,7 +831,7 @@ Links::Links(Annots *annots) {
   int size;
   int i;
 
-  links = NULL;
+  links = nullptr;
   size = 0;
   numLinks = 0;
 
@@ -870,7 +870,7 @@ LinkAction *Links::find(double x, double y) const {
       return links[i]->getAction();
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 GBool Links::onLink(double x, double y) const {
diff --git a/poppler/MarkedContentOutputDev.cc b/poppler/MarkedContentOutputDev.cc
index 7fdd8f54..4920ad32 100644
--- a/poppler/MarkedContentOutputDev.cc
+++ b/poppler/MarkedContentOutputDev.cc
@@ -18,12 +18,12 @@
 
 
 MarkedContentOutputDev::MarkedContentOutputDev(int mcidA):
-  currentFont(NULL),
-  currentText(NULL),
+  currentFont(nullptr),
+  currentText(nullptr),
   mcid(mcidA),
   pageWidth(0.0),
   pageHeight(0.0),
-  unicodeMap(NULL)
+  unicodeMap(nullptr)
 {
   currentColor.r = currentColor.g = currentColor.b = 0;
 }
@@ -48,7 +48,7 @@ void MarkedContentOutputDev::endSpan()
                                  currentFont,
                                  currentColor));
   }
-  currentText = NULL;
+  currentText = nullptr;
 }
 
 
@@ -73,7 +73,7 @@ void MarkedContentOutputDev::beginMarkedContent(char *name, Dict *properties)
 {
   int id = -1;
   if (properties)
-    properties->lookupInt("MCID", NULL, &id);
+    properties->lookupInt("MCID", nullptr, &id);
 
   if (id == -1)
     return;
@@ -102,9 +102,9 @@ bool MarkedContentOutputDev::needFontChange(GfxFont* font) const
     return gFalse;
 
   if (!currentFont)
-    return font != NULL && font->isOk();
+    return font != nullptr && font->isOk();
 
-  if (font == NULL)
+  if (font == nullptr)
     return gTrue;
 
   // Two non-null valid fonts are the same if they point to the same Ref
@@ -154,11 +154,11 @@ void MarkedContentOutputDev::drawChar(GfxState *state,
     currentColor = color;
 
   if (fontChange) {
-    if (currentFont != NULL) {
+    if (currentFont != nullptr) {
       currentFont->decRefCnt();
-      currentFont = NULL;
+      currentFont = nullptr;
     }
-    if (state->getFont() != NULL) {
+    if (state->getFont() != nullptr) {
       currentFont = state->getFont();
       currentFont->incRefCnt();
     }
@@ -197,7 +197,7 @@ void MarkedContentOutputDev::drawChar(GfxState *state,
       char buf[8];
       int n = unicodeMap->mapUnicode(u[i], buf, sizeof(buf));
       if (n > 0) {
-        if (currentText == NULL)
+        if (currentText == nullptr)
           currentText = new GooString();
         currentText->append(buf, n);
       }
diff --git a/poppler/Movie.cc b/poppler/Movie.cc
index fa709b3b..3cc922ff 100644
--- a/poppler/Movie.cc
+++ b/poppler/Movie.cc
@@ -173,7 +173,7 @@ void MovieActivationParameters::parseMovieActivation(Object* aDict) {
 }
 
 void Movie::parseMovie (Object *movieDict) {
-  fileName = NULL;
+  fileName = nullptr;
   rotationAngle = 0;
   width = -1;
   height = -1;
diff --git a/poppler/NameToCharCode.cc b/poppler/NameToCharCode.cc
index 5448dc4c..0ac7c7b6 100644
--- a/poppler/NameToCharCode.cc
+++ b/poppler/NameToCharCode.cc
@@ -32,7 +32,7 @@ NameToCharCode::NameToCharCode() {
   len = 0;
   tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry));
   for (i = 0; i < size; ++i) {
-    tab[i].name = NULL;
+    tab[i].name = nullptr;
   }
 }
 
@@ -58,7 +58,7 @@ void NameToCharCode::add(const char *name, CharCode c) {
     size = 2*size + 1;
     tab = (NameToCharCodeEntry *)gmallocn(size, sizeof(NameToCharCodeEntry));
     for (h = 0; h < size; ++h) {
-      tab[h].name = NULL;
+      tab[h].name = nullptr;
     }
     for (i = 0; i < oldSize; ++i) {
       if (oldTab[i].name) {
diff --git a/poppler/NameToUnicodeTable.h b/poppler/NameToUnicodeTable.h
index 827edbae..7345eabc 100644
--- a/poppler/NameToUnicodeTable.h
+++ b/poppler/NameToUnicodeTable.h
@@ -4274,7 +4274,7 @@ static struct NameToUnicodeTab nameToUnicodeTextTab[] = {
   {0x007c, "|"},
   {0x007d, "}"},
   {0x007e, "~"},
-  { 0, NULL }
+  { 0, nullptr }
 };
 
 // map ZapfDingbats names to Unicode
@@ -4480,5 +4480,5 @@ static struct NameToUnicodeTab nameToUnicodeZapfDingbatsTab[] = {
   {0x275c, "a98"},
   {0x275d, "a99"},
   {0x2720, "a9"},
-  { 0, NULL }
+  { 0, nullptr }
 };
diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index d2e878e4..b42ae56f 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -41,7 +41,7 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) :
   // we need to parse the dictionary here, and build optionalContentGroups
   ok = gTrue;
   optionalContentGroups = new GooList();
-  display = NULL;
+  display = nullptr;
 
   Object ocgList = ocgObject->dictLookup("OCGs");
   if (!ocgList.isArray()) {
@@ -141,7 +141,7 @@ bool OCGs::hasOCGs()
 OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref)
 {
   //TODO: make this more efficient
-  OptionalContentGroup *ocg = NULL;
+  OptionalContentGroup *ocg = nullptr;
   for (int i=0; i < optionalContentGroups->getLength(); ++i) {
     ocg = (OptionalContentGroup*)optionalContentGroups->get(i);
     if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) {
@@ -150,7 +150,7 @@ OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref)
   }
 
   // not found
-  return NULL;
+  return nullptr;
 }
 
 OCDisplayNode *OCGs::getDisplayRoot()
@@ -331,7 +331,7 @@ bool OCGs::anyOff( Array *ocgArray )
 
 //------------------------------------------------------------------------
 
-OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL)
+OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(nullptr)
 {
   Object ocgName = ocgDict->lookup("Name");
   if (!ocgName.isString()) {
@@ -404,7 +404,7 @@ OCDisplayNode *OCDisplayNode::parse(Object *obj, OCGs *oc,
 
   if (recursion > displayNodeRecursionLimit) {
     error(errSyntaxError, -1, "Loop detected in optional content order");
-    return NULL;
+    return nullptr;
   }
   if (obj->isRef()) {
     if ((ocgA = oc->findOcgByRef(obj->getRef()))) {
@@ -413,7 +413,7 @@ OCDisplayNode *OCDisplayNode::parse(Object *obj, OCGs *oc,
   }
   Object obj2 = obj->fetch(xref);
   if (!obj2.isArray()) {
-    return NULL;
+    return nullptr;
   }
   i = 0;
   if (obj2.arrayGetLength() >= 1) {
@@ -442,21 +442,21 @@ OCDisplayNode *OCDisplayNode::parse(Object *obj, OCGs *oc,
 }
 
 OCDisplayNode::OCDisplayNode() {
-  name = NULL;
-  ocg = NULL;
-  children = NULL;
+  name = nullptr;
+  ocg = nullptr;
+  children = nullptr;
 }
 
 OCDisplayNode::OCDisplayNode(GooString *nameA) {
   name = new GooString(nameA);
-  ocg = NULL;
-  children = NULL;
+  ocg = nullptr;
+  children = nullptr;
 }
 
 OCDisplayNode::OCDisplayNode(OptionalContentGroup *ocgA) {
-  name = (ocgA->getName()) ? ocgA->getName()->copy() : NULL;
+  name = (ocgA->getName()) ? ocgA->getName()->copy() : nullptr;
   ocg = ocgA;
-  children = NULL;
+  children = nullptr;
 }
 
 void OCDisplayNode::addChild(OCDisplayNode *child) {
@@ -478,7 +478,7 @@ GooList *OCDisplayNode::takeChildren() {
   GooList *childrenA;
 
   childrenA = children;
-  children = NULL;
+  children = nullptr;
   return childrenA;
 }
 
diff --git a/poppler/Outline.cc b/poppler/Outline.cc
index bd32ec0b..bc8768f1 100644
--- a/poppler/Outline.cc
+++ b/poppler/Outline.cc
@@ -64,9 +64,9 @@ OutlineItem::OutlineItem(Dict *dict, int refNumA, OutlineItem *parentA, XRef *xr
   refNum = refNumA;
   parent = parentA;
   xref = xrefA;
-  title = NULL;
-  action = NULL;
-  kids = NULL;
+  title = nullptr;
+  action = nullptr;
+  kids = nullptr;
 
 
   obj1 = dict->lookup("Title");
@@ -141,7 +141,7 @@ GooList *OutlineItem::readItemList(OutlineItem *parent, Object *firstItemRef, XR
 
   if (!items->getLength()) {
     delete items;
-    items = NULL;
+    items = nullptr;
   }
 
   return items;
@@ -156,6 +156,6 @@ void OutlineItem::open() {
 void OutlineItem::close() {
   if (kids) {
     deleteGooList(kids, OutlineItem);
-    kids = NULL;
+    kids = nullptr;
   }
 }
diff --git a/poppler/OutputDev.cc b/poppler/OutputDev.cc
index 0acdcbde..8afa7052 100644
--- a/poppler/OutputDev.cc
+++ b/poppler/OutputDev.cc
@@ -143,7 +143,7 @@ void OutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
 				int maskWidth, int maskHeight,
 				GBool maskInvert,
 				GBool maskInterpolate) {
-  drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+  drawImage(state, ref, str, width, height, colorMap, interpolate, nullptr, gFalse);
 }
 
 void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
@@ -154,7 +154,7 @@ void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
 				    int maskWidth, int maskHeight,
 				    GfxImageColorMap *maskColorMap,
 				    GBool maskInterpolate) {
-  drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
+  drawImage(state, ref, str, width, height, colorMap, interpolate, nullptr, gFalse);
 }
 
 void OutputDev::endMarkedContent(GfxState *state) {
@@ -188,7 +188,7 @@ void OutputDev::startProfile() {
 GooHash *OutputDev::endProfile() {
   GooHash *profile = profileHash;
 
-  profileHash = NULL;
+  profileHash = nullptr;
 
   return profile;
 }
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 13e3b027..a259f4b9 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -116,19 +116,19 @@ void PDFDoc::init()
 #endif
   ok = gFalse;
   errCode = errNone;
-  fileName = NULL;
-  file = NULL;
-  str = NULL;
-  xref = NULL;
-  linearization = NULL;
-  catalog = NULL;
-  hints = NULL;
+  fileName = nullptr;
+  file = nullptr;
+  str = nullptr;
+  xref = nullptr;
+  linearization = nullptr;
+  catalog = nullptr;
+  hints = nullptr;
 #ifndef DISABLE_OUTLINE
-  outline = NULL;
+  outline = nullptr;
 #endif
   startXRefPos = -1;
-  secHdlr = NULL;
-  pageCache = NULL;
+  secHdlr = nullptr;
+  pageCache = nullptr;
 }
 
 PDFDoc::PDFDoc()
@@ -163,7 +163,7 @@ PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
 #else
    file = GooFile::open(fileName);
 #endif
-  if (file == NULL) {
+  if (file == nullptr) {
     // fopen() has failed.
     // Keep a copy of the errno returned by fopen so that it can be 
     // referred to later.
@@ -239,7 +239,7 @@ PDFDoc::PDFDoc(BaseStream *strA, GooString *ownerPassword,
     fileNameU[n] = L'\0';
 #endif
   } else {
-    fileName = NULL;
+    fileName = nullptr;
 #ifdef _WIN32
     fileNameU = NULL;
 #endif
@@ -297,7 +297,7 @@ GBool PDFDoc::setup(GooString *ownerPassword, GooString *userPassword) {
       // try one more time to contruct the Catalog, maybe the problem is damaged XRef 
       delete catalog;
       delete xref;
-      xref = new XRef(str, 0, 0, NULL, true);
+      xref = new XRef(str, 0, 0, nullptr, true);
       catalog = new Catalog(this);
     }
 
@@ -464,14 +464,14 @@ GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword)
 std::vector<FormWidgetSignature*> PDFDoc::getSignatureWidgets()
 {
   int num_pages = getNumPages();
-  FormPageWidgets *page_widgets = NULL;
+  FormPageWidgets *page_widgets = nullptr;
   std::vector<FormWidgetSignature*> widget_vector;
 
   for (int i = 1; i <= num_pages; i++) {
     Page *p = getCatalog()->getPage(i);
     if (p) {
       page_widgets = p->getFormWidgets();
-      for (int j = 0; page_widgets != NULL && j < page_widgets->getNumWidgets(); j++) {
+      for (int j = 0; page_widgets != nullptr && j < page_widgets->getNumWidgets(); j++) {
 	if (page_widgets->getWidget(j)->getType() == formSignature) {
 	    widget_vector.push_back(static_cast<FormWidgetSignature*>(page_widgets->getWidget(j)));
 	}
@@ -537,7 +537,7 @@ void PDFDoc::displayPageSlice(OutputDev *out, int page,
 Links *PDFDoc::getLinks(int page) {
   Page *p = getPage(page);
   if (!p) {
-    return new Links (NULL);
+    return new Links (nullptr);
   }
   return p->getLinks();
 }
@@ -557,7 +557,7 @@ Linearization *PDFDoc::getLinearization()
 }
 
 GBool PDFDoc::checkLinearization() {
-  if (linearization == NULL)
+  if (linearization == nullptr)
     return gFalse;
   if (linearizationState == 1)
     return gTrue;
@@ -646,7 +646,7 @@ void PDFDoc::setDocInfoStringEntry(const char *key, GooString *value)
 GooString *PDFDoc::getDocInfoStringEntry(const char *key) {
   Object infoObj = getDocInfo();
   if (!infoObj.isDict()) {
-      return NULL;
+      return nullptr;
   }
 
   Object entryObj = infoObj.dictLookup(key);
@@ -656,7 +656,7 @@ GooString *PDFDoc::getDocInfoStringEntry(const char *key) {
   if (entryObj.isString()) {
     result = entryObj.takeString();
   } else {
-    result = NULL;
+    result = nullptr;
   }
 
   return result;
@@ -751,7 +751,7 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
     error(errInternal, -1, "Illegal pageNo: {0:d}({1:d})", pageNo, getNumPages() );
     return errOpenFile;
   }
-  PDFRectangle *cropBox = NULL;
+  PDFRectangle *cropBox = nullptr;
   if (getCatalog()->getPage(pageNo)->isCropped()) {
     cropBox = getCatalog()->getPage(pageNo)->getCropBox();
   }
@@ -770,7 +770,7 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
 
   yRef = new XRef(getXRef()->getTrailerDict());
 
-  if (secHdlr != NULL && !secHdlr->isUnencrypted()) {
+  if (secHdlr != nullptr && !secHdlr->isUnencrypted()) {
     yRef->setEncryption(secHdlr->getPermissionFlags(), 
       secHdlr->getOwnerPasswordOk(), fileKey, keyLength, secHdlr->getEncVersion(), secHdlr->getEncRevision(), encAlgorithm);
   }
@@ -841,7 +841,7 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
       if (j > 0) outStr->printf(" ");
       Object value = catDict->getValNF(j);
       outStr->printf("/%s ", key);
-      writeObject(&value, outStr, getXRef(), 0, NULL, cryptRC4, 0, 0, 0);
+      writeObject(&value, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0);
     }
   }
   outStr->printf(">>\nendobj\n");
@@ -851,7 +851,7 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
   outStr->printf("<< /Type /Pages /Kids [ %d 0 R ] /Count 1 ", rootNum + 2);
   if (resourcesObj.isDict()) {
     outStr->printf("/Resources ");
-    writeObject(&resourcesObj, outStr, getXRef(), 0, NULL, cryptRC4, 0, 0, 0);
+    writeObject(&resourcesObj, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0);
   }
   outStr->printf(">>\n");
   outStr->printf("endobj\n");
@@ -867,7 +867,7 @@ int PDFDoc::savePageAs(GooString *name, int pageNo)
       outStr->printf("/Parent %d 0 R", rootNum + 1);
     } else {
       outStr->printf("/%s ", key);
-      writeObject(&value, outStr, getXRef(), 0, NULL, cryptRC4, 0, 0, 0);
+      writeObject(&value, outStr, getXRef(), 0, nullptr, cryptRC4, 0, 0, 0);
     }
   }
   outStr->printf(" >>\nendobj\n");
@@ -1009,7 +1009,7 @@ void PDFDoc::saveIncrementalUpdate (OutStream* outStr)
 
   Goffset uxrefOffset = outStr->getPos();
   int numobjects = xref->getNumObjects();
-  const char *fileNameA = fileName ? fileName->getCString() : NULL;
+  const char *fileNameA = fileName ? fileName->getCString() : nullptr;
   Ref rootRef, uxrefStreamRef;
   rootRef.num = getXRef()->getRootNum();
   rootRef.gen = getXRef()->getRootGen();
@@ -1071,7 +1071,7 @@ void PDFDoc::saveCompleteRewrite (OutStream* outStr)
       Goffset offset = writeObjectHeader(&ref, outStr);
       // Write unencrypted objects in unencrypted form
       if (xref->getEntry(i)->getFlag(XRefEntry::Unencrypted)) {
-        writeObject(&obj1, outStr, NULL, cryptRC4, 0, 0, 0);
+        writeObject(&obj1, outStr, nullptr, cryptRC4, 0, 0, 0);
       } else {
         writeObject(&obj1, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen);
       }
@@ -1169,7 +1169,7 @@ void PDFDoc::writeString (GooString* s, OutStream* outStr, Guchar *fileKey,
                           CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen)
 {
   // Encrypt string if encryption is enabled
-  GooString *sEnc = NULL;
+  GooString *sEnc = nullptr;
   if (fileKey) {
     EncryptStream *enc = new EncryptStream(new MemStream(s->getCString(), 0, s->getLength(), Object(objNull)),
                                            fileKey, encAlgorithm, keyLength, objNum, objGen);
@@ -1284,7 +1284,7 @@ void PDFDoc::writeObject (Object* obj, OutStream* outStr, XRef *xRef, Guint numO
           //we write the stream unencoded => TODO: write stream encoder
 
           // Encrypt stream
-          EncryptStream *encStream = NULL;
+          EncryptStream *encStream = nullptr;
           GBool removeFilter = gTrue;
           if (stream->getKind() == strWeird && fileKey) {
             Object filter = stream->getDict()->lookup("Filter");
@@ -1310,7 +1310,7 @@ void PDFDoc::writeObject (Object* obj, OutStream* outStr, XRef *xRef, Guint numO
             } else {
               removeFilter = gFalse;
             }
-          } else if (fileKey != NULL) { // Encrypt stream
+          } else if (fileKey != nullptr) { // Encrypt stream
             encStream = new EncryptStream(stream, fileKey, encAlgorithm, keyLength, objNum, objGen);
             encStream->setAutoDelete(gFalse);
             stream = encStream;
@@ -1390,7 +1390,7 @@ Object PDFDoc::createTrailerDict(int uxrefSize, GBool incrUpdate, Goffset startx
   // - values of entry in information dictionnary
   GooString message;
   char buffer[256];
-  sprintf(buffer, "%i", (int)time(NULL));
+  sprintf(buffer, "%i", (int)time(nullptr));
   message.append(buffer);
 
   if (fileName)
@@ -1467,7 +1467,7 @@ void PDFDoc::writeXRefTableTrailer(Object &&trailerDict, XRef *uxref, GBool writ
 {
   uxref->writeTableToFile( outStr, writeAllEntries );
   outStr->printf( "trailer\r\n");
-  writeDictionnary(trailerDict.getDict(), outStr, xRef, 0, NULL, cryptRC4, 0, 0, 0, nullptr);
+  writeDictionnary(trailerDict.getDict(), outStr, xRef, 0, nullptr, cryptRC4, 0, 0, 0, nullptr);
   outStr->printf( "\r\nstartxref\r\n");
   outStr->printf( "%lli\r\n", uxrefOffset);
   outStr->printf( "%%%%EOF\r\n");
@@ -1484,7 +1484,7 @@ void PDFDoc::writeXRefStreamTrailer (Object &&trailerDict, XRef *uxref, Ref *uxr
   MemStream *mStream = new MemStream( stmData.getCString(), 0, stmData.getLength(), std::move(trailerDict) );
   writeObjectHeader(uxrefStreamRef, outStr);
   Object obj1(static_cast<Stream*>(mStream));
-  writeObject(&obj1, outStr, xRef, 0, NULL, cryptRC4, 0, 0, 0);
+  writeObject(&obj1, outStr, xRef, 0, nullptr, cryptRC4, 0, 0, 0);
   writeObjectFooter(outStr);
 
   outStr->printf( "startxref\r\n");
@@ -1495,7 +1495,7 @@ void PDFDoc::writeXRefStreamTrailer (Object &&trailerDict, XRef *uxref, Ref *uxr
 void PDFDoc::writeXRefTableTrailer(Goffset uxrefOffset, XRef *uxref, GBool writeAllEntries,
                                    int uxrefSize, OutStream* outStr, GBool incrUpdate)
 {
-  const char *fileNameA = fileName ? fileName->getCString() : NULL;
+  const char *fileNameA = fileName ? fileName->getCString() : nullptr;
   // file size (doesn't include the trailer)
   unsigned int fileSize = 0;
   int c;
@@ -1626,7 +1626,7 @@ void PDFDoc::replacePageDict(int pageNo, int rotate,
   Object mediaBoxObject(mediaBoxArray);
   Object trimBoxObject = mediaBoxObject.copy();
   pageDict->add(copyString("MediaBox"), std::move(mediaBoxObject));
-  if (cropBox != NULL) {
+  if (cropBox != nullptr) {
     Array *cropBoxArray = new Array(getXRef());
     cropBoxArray->add(Object(cropBox->x1));
     cropBoxArray->add(Object(cropBox->y1));
@@ -1801,9 +1801,9 @@ Guint PDFDoc::writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset, G
       Object obj = getXRef()->fetch(ref.num - numOffset, ref.gen);
       Goffset offset = writeObjectHeader(&ref, outStr);
       if (combine) {
-        writeObject(&obj, outStr, getXRef(), numOffset, NULL, cryptRC4, 0, 0, 0);
+        writeObject(&obj, outStr, getXRef(), numOffset, nullptr, cryptRC4, 0, 0, 0);
       } else if (xRef->getEntry(n)->getFlag(XRefEntry::Unencrypted)) {
-        writeObject(&obj, outStr, NULL, cryptRC4, 0, 0, 0);
+        writeObject(&obj, outStr, nullptr, cryptRC4, 0, 0, 0);
       } else {
         writeObject(&obj, outStr, fileKey, encAlgorithm, keyLength, ref.num, ref.gen);
       }
@@ -1950,37 +1950,37 @@ Page *PDFDoc::parsePage(int page)
   pageRef.num = getHints()->getPageObjectNum(page);
   if (!pageRef.num) {
     error(errSyntaxWarning, -1, "Failed to get object num from hint tables for page {0:d}", page);
-    return NULL;
+    return nullptr;
   }
 
   // check for bogus ref - this can happen in corrupted PDF files
   if (pageRef.num < 0 || pageRef.num >= xref->getNumObjects()) {
     error(errSyntaxWarning, -1, "Invalid object num ({0:d}) for page {1:d}", pageRef.num, page);
-    return NULL;
+    return nullptr;
   }
 
   pageRef.gen = xref->getEntry(pageRef.num)->gen;
   Object obj = xref->fetch(pageRef.num, pageRef.gen);
   if (!obj.isDict("Page")) {
     error(errSyntaxWarning, -1, "Object ({0:d} {1:d}) is not a pageDict", pageRef.num, pageRef.gen);
-    return NULL;
+    return nullptr;
   }
   Dict *pageDict = obj.getDict();
 
   return new Page(this, page, &obj, pageRef,
-               new PageAttrs(NULL, pageDict), catalog->getForm());
+               new PageAttrs(nullptr, pageDict), catalog->getForm());
 }
 
 Page *PDFDoc::getPage(int page)
 {
-  if ((page < 1) || page > getNumPages()) return NULL;
+  if ((page < 1) || page > getNumPages()) return nullptr;
 
   if (isLinearized() && checkLinearization()) {
     pdfdocLocker();
     if (!pageCache) {
       pageCache = (Page **) gmallocn(getNumPages(), sizeof(Page *));
       for (int i = 0; i < getNumPages(); i++) {
-        pageCache[i] = NULL;
+        pageCache[i] = nullptr;
       }
     }
     if (!pageCache[page-1]) {
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index cf043443..2f55557c 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -830,7 +830,7 @@ static const char *prolog[] = {
   "} def",
   "~123sn",
   "end",
-  NULL
+  nullptr
 };
 
 static const char *cmapProlog[] = {
@@ -875,7 +875,7 @@ static const char *cmapProlog[] = {
   "  currentdict CMapName exch /CMap defineresource pop",
   "end",
   "end",
-  NULL
+  nullptr
 };
 
 //------------------------------------------------------------------------
@@ -961,7 +961,7 @@ PSOutCustomColor::PSOutCustomColor(double cA, double mA,
   y = yA;
   k = kA;
   name = nameA;
-  next = NULL;
+  next = nullptr;
 }
 
 PSOutCustomColor::~PSOutCustomColor() {
@@ -1001,7 +1001,7 @@ public:
     { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; }
   int lookChar() override
     { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx]; }
-  GooString *getPSFilter(int psLevel, const char *indent) override { return NULL; }
+  GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; }
   GBool isBinary(GBool last = gTrue) override { return gTrue; }
   GBool isEncoder() override { return gTrue; }
 
@@ -1025,7 +1025,7 @@ DeviceNRecoder::DeviceNRecoder(Stream *strA, int widthA, int heightA,
   width = widthA;
   height = heightA;
   colorMap = colorMapA;
-  imgStr = NULL;
+  imgStr = nullptr;
   pixelIdx = 0;
   bufIdx = gfxColorMaxComps;
   bufSize = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())->
@@ -1099,28 +1099,28 @@ PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc,
   FILE *f;
   PSFileType fileTypeA;
 
-  underlayCbk = NULL;
-  underlayCbkData = NULL;
-  overlayCbk = NULL;
-  overlayCbkData = NULL;
+  underlayCbk = nullptr;
+  underlayCbkData = nullptr;
+  overlayCbk = nullptr;
+  overlayCbkData = nullptr;
   customCodeCbk = customCodeCbkA;
   customCodeCbkData = customCodeCbkDataA;
 
-  fontIDs = NULL;
+  fontIDs = nullptr;
   fontNames = new GooHash(gTrue);
   fontMaxValidGlyph = new GooHash(gTrue);
-  t1FontNames = NULL;
-  font8Info = NULL;
-  font16Enc = NULL;
-  imgIDs = NULL;
-  formIDs = NULL;
-  paperSizes = NULL;
-  embFontList = NULL;
-  customColors = NULL;
+  t1FontNames = nullptr;
+  font8Info = nullptr;
+  font16Enc = nullptr;
+  imgIDs = nullptr;
+  formIDs = nullptr;
+  paperSizes = nullptr;
+  embFontList = nullptr;
+  customColors = nullptr;
   haveTextClip = gFalse;
-  t3String = NULL;
+  t3String = nullptr;
   forceRasterize = forceRasterizeA;
-  psTitle = NULL;
+  psTitle = nullptr;
 
   // open file or pipe
   if (!strcmp(fileName, "-")) {
@@ -1168,28 +1168,28 @@ PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
 			 GBool manualCtrlA,
 			 PSOutCustomCodeCbk customCodeCbkA,
 			 void *customCodeCbkDataA) {
-  underlayCbk = NULL;
-  underlayCbkData = NULL;
-  overlayCbk = NULL;
-  overlayCbkData = NULL;
+  underlayCbk = nullptr;
+  underlayCbkData = nullptr;
+  overlayCbk = nullptr;
+  overlayCbkData = nullptr;
   customCodeCbk = customCodeCbkA;
   customCodeCbkData = customCodeCbkDataA;
 
-  fontIDs = NULL;
+  fontIDs = nullptr;
   fontNames = new GooHash(gTrue);
   fontMaxValidGlyph = new GooHash(gTrue);
-  t1FontNames = NULL;
-  font8Info = NULL;
-  font16Enc = NULL;
-  imgIDs = NULL;
-  formIDs = NULL;
-  paperSizes = NULL;
-  embFontList = NULL;
-  customColors = NULL;
+  t1FontNames = nullptr;
+  font8Info = nullptr;
+  font16Enc = nullptr;
+  imgIDs = nullptr;
+  formIDs = nullptr;
+  paperSizes = nullptr;
+  embFontList = nullptr;
+  customColors = nullptr;
   haveTextClip = gFalse;
-  t3String = NULL;
+  t3String = nullptr;
   forceRasterize = forceRasterizeA;
-  psTitle = NULL;
+  psTitle = nullptr;
 
   init(outputFuncA, outputStreamA, psGeneric, psTitleA,
        doc, pages, modeA,
@@ -1222,7 +1222,7 @@ static const StandardMedia standardMedia[] =
     { "Folio",     612,  936 },
     { "Quarto",    610,  780 },
     { "10x14",     720, 1008 },
-    { NULL,          0,    0 }
+    { nullptr,          0,    0 }
 };
 
 /* PLRM specifies a tolerance of 5 points when matching page sizes */
@@ -1271,7 +1271,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
   outputFunc = outputFuncA;
   outputStream = outputStreamA;
   fileType = fileTypeA;
-  psTitle = (psTitleA? strdup(psTitleA): NULL);
+  psTitle = (psTitleA? strdup(psTitleA): nullptr);
   doc = docA;
   level = globalParams->getPSLevel();
   pages = pagesA;
@@ -1286,7 +1286,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
   imgURY = imgURYA;
   manualCtrl = manualCtrlA;
 
-  xref = NULL;
+  xref = nullptr;
 
   processColors = 0;
   inType3Char = gFalse;
@@ -1338,7 +1338,7 @@ void PSOutputDev::postInit()
   for (size_t pgi = 0; pgi < pages.size(); ++pgi) {
     const int pg = pages[pgi];
     page = catalog->getPage(pg);
-    if (page == NULL)
+    if (page == nullptr)
       paperMatch = gFalse;
     if (!paperMatch) {
       w = paperWidth;
@@ -1373,7 +1373,7 @@ void PSOutputDev::postInit()
     }
     if (i == paperSizes->getLength()) {
       const StandardMedia *media = standardMedia;
-      GooString *name = NULL;
+      GooString *name = nullptr;
       while (media->name) {
         if (pageDimensionEqual(w, media->width) && pageDimensionEqual(h, media->height)) {
           name = new GooString(media->name);
@@ -1877,7 +1877,7 @@ void PSOutputDev::setupFonts(Dict *resDict) {
       gfxFontDict = new GfxFontDict(xref, &r, obj2.getDict());
     }
   } else if (obj1.isDict()) {
-    gfxFontDict = new GfxFontDict(xref, NULL, obj1.getDict());
+    gfxFontDict = new GfxFontDict(xref, nullptr, obj1.getDict());
   }
   if (gfxFontDict) {
     for (i = 0; i < gfxFontDict->getNumFonts(); ++i) {
@@ -1916,7 +1916,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
   }
   fontIDs[fontIDLen++] = *font->getID();
 
-  psName = NULL;
+  psName = nullptr;
   xs = ys = 1;
   subst = gFalse;
 
@@ -1926,7 +1926,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
     setupType3Font(font, psName, parentResDict);
   } else {
     fontLoc = font->locateFont(xref, this);
-    if (fontLoc != NULL) {
+    if (fontLoc != nullptr) {
       switch (fontLoc->locType) {
       case gfxFontLocEmbedded:
 	switch (fontLoc->fontType) {
@@ -2016,7 +2016,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
 					       sizeof(PSFont16Enc));
 	}
 	font16Enc[font16EncLen].fontID = *font->getID();
-	font16Enc[font16EncLen].enc = NULL;
+	font16Enc[font16EncLen].enc = nullptr;
 	++font16EncLen;
       } else {
 	error(errSyntaxError, -1,
@@ -2068,7 +2068,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
 	error(errSyntaxError, -1,
 	      "Couldn't find Unicode map for 16-bit font encoding '{0:t}'",
 	      fontLoc->encoding);
-	font16Enc[font16EncLen].enc = NULL;
+	font16Enc[font16EncLen].enc = nullptr;
       }
       ++font16EncLen;
     }
@@ -2407,7 +2407,7 @@ void PSOutputDev::setupEmbeddedType1CFont(GfxFont *font, Ref *id,
   // convert it to a Type 1 font
   if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) {
     if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) {
-      ffT1C->convertToType1(psName->getCString(), NULL, gTrue,
+      ffT1C->convertToType1(psName->getCString(), nullptr, gTrue,
 			    outputFunc, outputStream);
       delete ffT1C;
     }
@@ -2453,7 +2453,7 @@ void PSOutputDev::setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id,
   if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) {
     if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) {
       if (ffTT->isOpenTypeCFF()) {
-	ffTT->convertToType1(psName->getCString(), NULL, gTrue,
+	ffTT->convertToType1(psName->getCString(), nullptr, gTrue,
 			     outputFunc, outputStream);
       }
       delete ffTT;
@@ -2485,7 +2485,7 @@ void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id,
       ffTT->convertToType42(psName->getCString(),
 			    ((Gfx8BitFont *)font)->getHasEncoding()
 			      ? ((Gfx8BitFont *)font)->getEncoding()
-			      : (char **)NULL,
+			      : (char **)nullptr,
 			    codeToGID, outputFunc, outputStream);
       if (codeToGID) {
 	if (font8InfoLen >= font8InfoSize) {
@@ -2524,7 +2524,7 @@ void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, GooString *fileName,
     ffTT->convertToType42(psName->getCString(),
 			  ((Gfx8BitFont *)font)->getHasEncoding()
 			    ? ((Gfx8BitFont *)font)->getEncoding()
-			    : (char **)NULL,
+			    : (char **)nullptr,
 			  codeToGID, outputFunc, outputStream);
     if (codeToGID) {
       if (font8InfoLen >= font8InfoSize) {
@@ -2572,7 +2572,7 @@ void PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font,
 
     // check for embedding permission
     if (ffTT->getEmbeddingRights() >= 1) {
-      codeToGID = NULL;
+      codeToGID = nullptr;
       codeToGIDLen = 0;
       if (((GfxCIDFont *)font)->getCIDToGID()) {
 	codeToGIDLen = ((GfxCIDFont *)font)->getCIDToGIDLen();
@@ -2654,11 +2654,11 @@ void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id,
     if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) {
       if (globalParams->getPSLevel() >= psLevel3) {
 	// Level 3: use a CID font
-	ffT1C->convertToCIDType0(psName->getCString(), NULL, 0,
+	ffT1C->convertToCIDType0(psName->getCString(), nullptr, 0,
 				 outputFunc, outputStream);
       } else {
 	// otherwise: use a non-CID composite font
-	ffT1C->convertToType0(psName->getCString(), NULL, 0,
+	ffT1C->convertToType0(psName->getCString(), nullptr, 0,
 			      outputFunc, outputStream);
       }
       delete ffT1C;
@@ -2823,7 +2823,7 @@ void PSOutputDev::setupType3Font(GfxFont *font, GooString *psName,
     box.y1 = m[1];
     box.x2 = m[2];
     box.y2 = m[3];
-    gfx = new Gfx(doc, this, resDict, &box, NULL);
+    gfx = new Gfx(doc, this, resDict, &box, nullptr);
     inType3Char = gTrue;
     for (i = 0; i < charProcs->getLength(); ++i) {
       t3FillColorOnly = gFalse;
@@ -2846,7 +2846,7 @@ void PSOutputDev::setupType3Font(GfxFont *font, GooString *psName,
 	(*outputFunc)(outputStream, t3String->getCString(),
 		      t3String->getLength());
 	delete t3String;
-	t3String = NULL;
+	t3String = nullptr;
       }
       if (t3NeedsRestore) {
 	(*outputFunc)(outputStream, "Q\n", 2);
@@ -3196,7 +3196,7 @@ void PSOutputDev::setupForm(Ref id, Object *strObj) {
 
   // get resources
   Object resObj = dict->lookup("Resources");
-  resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
+  resDict = resObj.isDict() ? resObj.getDict() : (Dict *)nullptr;
 
   writePSFmt("/f_{0:d}_{1:d} {{\n", id.num, id.gen);
   writePS("q\n");
@@ -3751,7 +3751,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) {
     (*underlayCbk)(this, underlayCbkData);
   }
   if (overlayCbk) {
-    saveState(NULL);
+    saveState(nullptr);
   }
 
   xScale = yScale = 1;
@@ -3965,7 +3965,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) {
 
 void PSOutputDev::endPage() {
   if (overlayCbk) {
-    restoreState(NULL);
+    restoreState(nullptr);
     (*overlayCbk)(this, overlayCbkData);
   }
 
@@ -4416,7 +4416,7 @@ GBool PSOutputDev::tilingPatternFillL1(GfxState *state, Catalog *cat, Object *st
   box.y1 = bbox[1];
   box.x2 = bbox[2];
   box.y2 = bbox[3];
-  gfx = new Gfx(doc, this, resDict, &box, NULL);
+  gfx = new Gfx(doc, this, resDict, &box, nullptr);
   writePS("/x {\n");
   if (paintType == 2) {
     writePSFmt("{0:.6g} 0 {1:.6g} {2:.6g} {3:.6g} {4:.6g} setcachedevice\n",
@@ -4489,7 +4489,7 @@ GBool PSOutputDev::tilingPatternFillL2(GfxState *state, Catalog *cat, Object *st
   box.y1 = bbox[1];
   box.x2 = bbox[2];
   box.y2 = bbox[3];
-  gfx = new Gfx(doc, this, resDict, &box, NULL);
+  gfx = new Gfx(doc, this, resDict, &box, nullptr);
   inType3Char = gTrue;
   if (paintType == 2) {
     inUncoloredPattern = gTrue;
@@ -4534,7 +4534,7 @@ GBool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, O
     box.y1 = bbox[1];
     box.x2 = bbox[2];
     box.y2 = bbox[3];
-    gfx = new Gfx(doc, this, resDict, &box, NULL, NULL, NULL, gfxA->getXRef());
+    gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA->getXRef());
     writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] cm\n", mat[0], mat[1], mat[2], mat[3], tx, ty);
     inType3Char = gTrue;
     gfx->display(str);
@@ -5047,8 +5047,8 @@ void PSOutputDev::drawString(GfxState *state, GooString *s) {
   wMode = font->getWMode();
 
   // check for a subtitute 16-bit font
-  uMap = NULL;
-  codeToGID = NULL;
+  uMap = nullptr;
+  codeToGID = nullptr;
   if (font->isCIDFont()) {
     for (i = 0; i < font16EncLen; ++i) {
       if (font->getID()->num == font16Enc[i].fontID.num &&
@@ -5190,18 +5190,18 @@ void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
   switch (level) {
     case psLevel1:
     case psLevel1Sep:
-      doImageL1(ref, NULL, invert, inlineImg, str, width, height, len,
-                NULL, NULL, 0, 0, gFalse);
+      doImageL1(ref, nullptr, invert, inlineImg, str, width, height, len,
+                nullptr, nullptr, 0, 0, gFalse);
     break;
     case psLevel2:
     case psLevel2Sep:
-      doImageL2(ref, NULL, invert, inlineImg, str, width, height, len,
-                NULL, NULL, 0, 0, gFalse);
+      doImageL2(ref, nullptr, invert, inlineImg, str, width, height, len,
+                nullptr, nullptr, 0, 0, gFalse);
     break;
     case psLevel3:
     case psLevel3Sep:
-      doImageL3(ref, NULL, invert, inlineImg, str, width, height, len,
-                NULL, NULL, 0, 0, gFalse);
+      doImageL3(ref, nullptr, invert, inlineImg, str, width, height, len,
+                nullptr, nullptr, 0, 0, gFalse);
     break;
   }
 }
@@ -5230,22 +5230,22 @@ void PSOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   switch (level) {
   case psLevel1:
     doImageL1(ref, colorMap, gFalse, inlineImg, str,
-	     width, height, len, maskColors, NULL, 0, 0, gFalse);
+	     width, height, len, maskColors, nullptr, 0, 0, gFalse);
     break;
   case psLevel1Sep:
     //~ handle indexed, separation, ... color spaces
     doImageL1Sep(ref, colorMap, gFalse, inlineImg, str,
-	     width, height, len, maskColors, NULL, 0, 0, gFalse);
+	     width, height, len, maskColors, nullptr, 0, 0, gFalse);
     break;
   case psLevel2:
   case psLevel2Sep:
     doImageL2(ref, colorMap, gFalse, inlineImg, str,
-	      width, height, len, maskColors, NULL, 0, 0, gFalse);
+	      width, height, len, maskColors, nullptr, 0, 0, gFalse);
     break;
   case psLevel3:
   case psLevel3Sep:
     doImageL3(ref, colorMap, gFalse, inlineImg, str,
-	      width, height, len, maskColors, NULL, 0, 0, gFalse);
+	      width, height, len, maskColors, nullptr, 0, 0, gFalse);
     break;
   }
   t3Cacheable = gFalse;
@@ -5265,22 +5265,22 @@ void PSOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
   switch (level) {
   case psLevel1:
     doImageL1(ref, colorMap, gFalse, gFalse, str, width, height, len,
-	      NULL, maskStr, maskWidth, maskHeight, maskInvert);    
+	      nullptr, maskStr, maskWidth, maskHeight, maskInvert);    
     break;
   case psLevel1Sep:
     //~ handle indexed, separation, ... color spaces
     doImageL1Sep(ref, colorMap, gFalse, gFalse, str, width, height, len,
-	      NULL, maskStr, maskWidth, maskHeight, maskInvert);    
+	      nullptr, maskStr, maskWidth, maskHeight, maskInvert);    
     break;
   case psLevel2:
   case psLevel2Sep:
     doImageL2(ref, colorMap, gFalse, gFalse, str, width, height, len,
-	      NULL, maskStr, maskWidth, maskHeight, maskInvert);
+	      nullptr, maskStr, maskWidth, maskHeight, maskInvert);
     break;
   case psLevel3:
   case psLevel3Sep:
     doImageL3(ref, colorMap, gFalse, gFalse, str, width, height, len,
-	      NULL, maskStr, maskWidth, maskHeight, maskInvert);
+	      nullptr, maskStr, maskWidth, maskHeight, maskInvert);
     break;
   }
   t3Cacheable = gFalse;
@@ -5993,7 +5993,7 @@ void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap,
   // filters
   if ((mode == psModeForm || inType3Char || preloadImagesForms) &&
       uncompressPreloadedImages) {
-    s = NULL;
+    s = nullptr;
     useLZW = useRLE = gFalse;
     useCompressed = gFalse;
     useASCII = gFalse;
@@ -6167,7 +6167,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
 
   useFlate = useLZW = useRLE = useASCII = useCompressed = gFalse;
   maskUseFlate = maskUseLZW = maskUseRLE = maskUseASCII = maskUseCompressed = gFalse;
-  maskFilters = NULL; // make gcc happy
+  maskFilters = nullptr; // make gcc happy
 
   // explicit masking
   if (maskStr) {
@@ -6175,7 +6175,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
     // mask data source
     if ((mode == psModeForm || inType3Char || preloadImagesForms) &&
       uncompressPreloadedImages) {
-      s = NULL;
+      s = nullptr;
     } else {
       s = maskStr->getPSFilter(3, "  ");
       if (!s) {
@@ -6414,7 +6414,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxImageColorMap *colorMap,
 
   if ((mode == psModeForm || inType3Char || preloadImagesForms) &&
       uncompressPreloadedImages) {
-    s = NULL;
+    s = nullptr;
   } else {
     s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3,
 			 "    ");
@@ -6725,7 +6725,7 @@ void PSOutputDev::dumpColorSpaceL2(GfxColorSpace *colorSpace,
       if (((GfxDeviceNColorSpace *)baseCS)->getAlt()->getMode() == csLab) {
 	labCS = (GfxLabColorSpace *)((GfxDeviceNColorSpace *)baseCS)->getAlt();
       } else {
-	labCS = NULL;
+	labCS = nullptr;
       }
       numAltComps = ((GfxDeviceNColorSpace *)baseCS)->getAlt()->getNComps();
       p = lookup;
diff --git a/po