From 1edcdf98ea33bcb8d6590ff9df1ce70ac5c2e978 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:12:48 -0700 Subject: [PATCH 1/9] [CMake] Add ExternalLibXML2.cmake, set up CMakeLists.txt --- CMakeLists.txt | 8 +++++ c/makeotf/lib/cffread/CMakeLists.txt | 16 ++++++++- c/makeotf/lib/hotconv/CMakeLists.txt | 11 ++++++ c/makeotf/lib/pstoken/CMakeLists.txt | 11 ++++++ c/makeotf/lib/typecomp/CMakeLists.txt | 11 ++++++ c/makeotf/source/CMakeLists.txt | 12 ++++++- c/mergefonts/source/CMakeLists.txt | 15 +++++++- c/rotatefont/source/CMakeLists.txt | 14 ++++++++ c/shared/source/CMakeLists.txt | 14 ++++++++ c/tx/source/CMakeLists.txt | 13 +++++++ cmake/ExternalLibXML2.cmake | 50 +++++++++++++++++++++++++++ 11 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 cmake/ExternalLibXML2.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index e9c8c08e5..9ce80598c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,14 @@ set(ANTLR4_WITH_STATIC_CRT OFF) set(ANTLR4_TAG tags/4.9.3) include(ExternalAntlr4Cpp) +FIND_PACKAGE(LibXml2) +IF (NOT ${LibXml2_FOUND}) + MESSAGE(STATUS "Could not locate LibXml2, will install externally.") + set(LIBXML2_TAG tags/v2.9.13) + include(ExternalLibXML2) +ENDIF(NOT ${LibXml2_FOUND}) +include_directories(${LIBXML2_INCLUDE_DIR}) + # sanitizer support # work around https://github.com/pypa/setuptools/issues/1928 with environment # variable diff --git a/c/makeotf/lib/cffread/CMakeLists.txt b/c/makeotf/lib/cffread/CMakeLists.txt index 5497ab7a2..9a400fdef 100644 --- a/c/makeotf/lib/cffread/CMakeLists.txt +++ b/c/makeotf/lib/cffread/CMakeLists.txt @@ -1,4 +1,18 @@ add_library(makeotf_cffread STATIC cffread.c) -target_compile_definitions(makeotf_cffread PRIVATE $<$:CFF_DEBUG=1> CFF_T13_SUPPORT=0) +target_include_directories(makeotf_cffread PRIVATE AFTER $<$:${ANTLR4_INCLUDE_DIRS}>) + +if (${LibXml2_FOUND}) + target_link_libraries(makeotf_cffread PUBLIC ${LIBXML2_LIBRARY}) +else () + add_dependencies(makeotf_cffread ${LIBXML2_TARGET}) + if (WIN32) + target_link_libraries(makeotf_cffread PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(makeotf_cffread PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() +target_link_libraries(makeotf_cffread PUBLIC antlr4_static) + +target_compile_definitions(makeotf_cffread PRIVATE $<$:CFF_DEBUG=1> CFF_T13_SUPPORT=0) diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt index 82257bf2f..3cceceeab 100644 --- a/c/makeotf/lib/hotconv/CMakeLists.txt +++ b/c/makeotf/lib/hotconv/CMakeLists.txt @@ -71,6 +71,17 @@ set_property(TARGET hotconv PROPERTY C_STANDARD 99) target_include_directories(hotconv PRIVATE AFTER $<$:${ANTLR4_INCLUDE_DIRS}>) target_link_libraries(hotconv PUBLIC antlr4_static) +if (${LibXml2_FOUND}) + target_link_libraries(hotconv PUBLIC ${LIBXML2_LIBRARY}) +else () + add_dependencies(hotconv ${LIBXML2_TARGET}) + if (WIN32) + target_link_libraries(hotconv PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(hotconv PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + if ( CMAKE_COMPILER_IS_GNUCC ) target_compile_options(hotconv PRIVATE -Wall -Wno-attributes) # set_source_files_properties(${GENERATED_SOURCES} PROPERTIES COMPILE_FLAGS -Wno-attributes) diff --git a/c/makeotf/lib/pstoken/CMakeLists.txt b/c/makeotf/lib/pstoken/CMakeLists.txt index 2bb9e98e5..1f928976f 100644 --- a/c/makeotf/lib/pstoken/CMakeLists.txt +++ b/c/makeotf/lib/pstoken/CMakeLists.txt @@ -1,3 +1,14 @@ add_library(makeotf_pstoken STATIC pstoken.c) +if (${LibXml2_FOUND}) + target_link_libraries(makeotf_pstoken PUBLIC ${LIBXML2_LIBRARY}) +else () + add_dependencies(makeotf_pstoken ${LIBXML2_TARGET}) + if (WIN32) + target_link_libraries(makeotf_pstoken PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(makeotf_pstoken PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + target_compile_definitions(makeotf_pstoken PRIVATE PSTOKEN_DEBUG=1 CFF_DEBUG=1 CFF_T13_SUPPORT=0) diff --git a/c/makeotf/lib/typecomp/CMakeLists.txt b/c/makeotf/lib/typecomp/CMakeLists.txt index b3bc439af..39cbd8a58 100644 --- a/c/makeotf/lib/typecomp/CMakeLists.txt +++ b/c/makeotf/lib/typecomp/CMakeLists.txt @@ -45,6 +45,17 @@ add_library(typecomp STATIC tc.c ) +if (${LibXml2_FOUND}) + target_link_libraries(typecomp PUBLIC ${LIBXML2_LIBRARY}) +else () + add_dependencies(typecomp ${LIBXML2_TARGET}) + if (WIN32) + target_link_libraries(typecomp PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(typecomp PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + target_compile_definitions(typecomp PRIVATE TC_HINT_CHECK=1 TC_T13_SUPPORT=0 diff --git a/c/makeotf/source/CMakeLists.txt b/c/makeotf/source/CMakeLists.txt index 21ed70585..5f15b3a02 100644 --- a/c/makeotf/source/CMakeLists.txt +++ b/c/makeotf/source/CMakeLists.txt @@ -23,8 +23,18 @@ target_sources(makeotfexe PRIVATE target_link_libraries(makeotfexe PRIVATE ctutil dynarr hotconv makeotf_pstoken typecomp makeotf_cffread) -if(HAVE_M_LIB) +if (HAVE_M_LIB) target_link_libraries(makeotfexe PRIVATE m) +endif () + +if (${LibXml2_FOUND}) + target_link_libraries(makeotfexe PUBLIC ${LIBXML2_LIBRARY}) +else () + if (WIN32) + target_link_libraries(makeotfexe PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(makeotfexe PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() endif() target_compile_definitions(makeotfexe PRIVATE MAKEOTFLIB_EXPORTS=1) diff --git a/c/mergefonts/source/CMakeLists.txt b/c/mergefonts/source/CMakeLists.txt index 53a6ca945..b77d1ef4c 100644 --- a/c/mergefonts/source/CMakeLists.txt +++ b/c/mergefonts/source/CMakeLists.txt @@ -6,6 +6,19 @@ add_executable(mergefonts ) target_include_directories(mergefonts PRIVATE ../../shared/include ../../shared/resource ../../shared/source/tx_shared) + target_link_libraries(mergefonts PUBLIC tx_shared) -install(TARGETS mergefonts DESTINATION bin) +if (${LibXml2_FOUND}) + target_link_libraries(mergefonts PUBLIC ${LIBXML2_LIBRARY}) +else () + add_dependencies(mergefonts ${LIBXML2_TARGET}) + target_compile_definitions(mergefonts PUBLIC -DLIBXML_STATIC) + if (WIN32) + target_link_libraries(mergefonts PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(mergefonts PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + +install(TARGETS mergefonts DESTINATION bin) diff --git a/c/rotatefont/source/CMakeLists.txt b/c/rotatefont/source/CMakeLists.txt index 42d2141f8..6d3660d32 100644 --- a/c/rotatefont/source/CMakeLists.txt +++ b/c/rotatefont/source/CMakeLists.txt @@ -6,5 +6,19 @@ add_executable(rotatefont ) target_include_directories(rotatefont PRIVATE ../../shared/include ../../shared/resource ../../shared/source/tx_shared) + target_link_libraries(rotatefont PUBLIC tx_shared) + +if(${LibXml2_FOUND}) + target_link_libraries(rotatefont PUBLIC ${LIBXML2_LIBRARY}) +else() + add_dependencies(rotatefont ${LIBXML2_TARGET}) + target_compile_definitions(rotatefont PUBLIC -DLIBXML_STATIC) + if (WIN32) + target_link_libraries(rotatefont PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(rotatefont PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + install(TARGETS rotatefont DESTINATION bin) diff --git a/c/shared/source/CMakeLists.txt b/c/shared/source/CMakeLists.txt index 3cf291f5c..f6a4ca04e 100644 --- a/c/shared/source/CMakeLists.txt +++ b/c/shared/source/CMakeLists.txt @@ -3,6 +3,9 @@ include_directories(../include ../resource) MACRO(ADD_AFDKOLIB lm) file(GLOB sl_sources "${lm}/*") add_library(${lm} STATIC ${sl_sources}) + if(NOT ${LibXml2_FOUND}) + add_dependencies(${lm} ${LIBXML2_TARGET}) + endif(NOT ${LibXml2_FOUND}) ENDMACRO(ADD_AFDKOLIB) ADD_AFDKOLIB(absfont) @@ -44,6 +47,17 @@ target_compile_definitions(t1write PRIVATE $<$:T1W_DEBUG=1>) target_compile_definitions(ttread PRIVATE $<$:TTR_DEBUG=1>) target_compile_definitions(tx_shared PRIVATE $<$:CFW_DEBUG=1>) +if(${LibXml2_FOUND}) + target_link_libraries(tx_shared PUBLIC ${LIBXML2_LIBRARY}) +else() + target_compile_definitions(tx_shared PUBLIC -DLIBXML_STATIC) + if (WIN32) + target_link_libraries(tx_shared PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(tx_shared PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + # These libraries are partially ordered target_link_libraries(tx_shared PUBLIC diff --git a/c/tx/source/CMakeLists.txt b/c/tx/source/CMakeLists.txt index be4097a87..684cb7ed1 100644 --- a/c/tx/source/CMakeLists.txt +++ b/c/tx/source/CMakeLists.txt @@ -7,4 +7,17 @@ add_executable(tx target_include_directories(tx PRIVATE ../../shared/include ../../shared/resource ../../shared/source/tx_shared) target_link_libraries(tx PUBLIC tx_shared) + +if(${LibXml2_FOUND}) + target_link_libraries(tx PUBLIC ${LIBXML2_LIBRARY}) +else() + add_dependencies(tx ${LIBXML2_TARGET}) + target_compile_definitions(tx PUBLIC -DLIBXML_STATIC) + if (WIN32) + target_link_libraries(tx PUBLIC ${LIBXML2_WIN_LIBRARIES}) + else () + target_link_libraries(tx PUBLIC ${LIBXML2_NONWIN_LIBRARIES}) + endif() +endif() + install(TARGETS tx DESTINATION bin) diff --git a/cmake/ExternalLibXML2.cmake b/cmake/ExternalLibXML2.cmake new file mode 100644 index 000000000..df4233b9b --- /dev/null +++ b/cmake/ExternalLibXML2.cmake @@ -0,0 +1,50 @@ +include (ExternalProject) +cmake_policy(SET CMP0114 NEW) + +set(LIBXML2_TARGET external.libxml2) + +set(LIBXML2_GIT_REPOSITORY https://gitlab.gnome.org/GNOME/libxml2.git) +if(NOT DEFINED LIBXML2_TAG) + set(LIBXML2_TAG master) +endif() + +if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*") + set(LIBXML2_OUTPUT_DIR ${LIBXML2_TARGET}/bin/${CMAKE_BUILD_TYPE}) +else() + set(LIBXML2_OUTPUT_DIR ${LIBXML2_TARGET}/bin) +endif() + +if(WIN32) + set(LIBXML2_LIBNAME libxml2s.lib) +else() + set(LIBXML2_LIBNAME libxml2.a) +endif() + +ExternalProject_Add(${LIBXML2_TARGET} + GIT_REPOSITORY ${LIBXML2_GIT_REPOSITORY} + GIT_TAG ${LIBXML2_TAG} + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${LIBXML2_OUTPUT_DIR}/${LIBXML2_LIBNAME} + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${LIBXML2_TARGET}/src + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${LIBXML2_TARGET}/bin + CMAKE_ARGS -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Release -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_LZMA=OFF -D LIBXML2_WITH_ZLIB=OFF -D LIBXML2_WITH_PYTHON=OFF -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON + INSTALL_COMMAND "" +) + +ExternalProject_Get_Property(${LIBXML2_TARGET} BINARY_DIR) +ExternalProject_Get_Property(${LIBXML2_TARGET} SOURCE_DIR) + +file(MAKE_DIRECTORY ${SOURCE_DIR}/include) + +add_library(libxml2 STATIC IMPORTED GLOBAL) + +add_dependencies(libxml2 ${LIBXML2_TARGET}) +set_target_properties(libxml2 PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${LIBXML2_OUTPUT_DIR}/${LIBXML2_LIBNAME} + INTERFACE_INCLUDE_DIRECTORIES ${SOURCE_DIR}/include) +target_include_directories(libxml2 INTERFACE ${SOURCE_DIR}/include INTERFACE ${BINARY_DIR}) + +set(LIBXML2_INCLUDE_DIR ${SOURCE_DIR}/include ${BINARY_DIR}) + +set(LIBXML2_WIN_LIBRARIES wsock32 ws2_32 libxml2) + +set(LIBXML2_NONWIN_LIBRARIES libxml2) From ab8b7c8165164b59c0e960bb30d4cfd1edd032e5 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:21:43 -0700 Subject: [PATCH 2/9] [.github] Update wheels for libxml2 --- .github/workflows/build_wheels.yml | 7 +++++-- .github/workflows/run_cvg.yml | 7 +------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 7f8cceb82..56760852f 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -44,7 +44,7 @@ jobs: env: CIBW_BUILD: "cp39-*" CIBW_ARCHS_MACOS: universal2 - CIBW_ENVIRONMENT_MACOS: "CFLAGS='-arch arm64 -arch x86_64' CXXFLAGS='-arch arm64 -arch x86_64' LDFLAGS='-arch arm64 -arch x86_64'" + CIBW_ENVIRONMENT_MACOS: "CFLAGS='-arch arm64 -arch x86_64 -I/usr/include/libxml2' CXXFLAGS='-arch arm64 -arch x86_64' LDFLAGS='-arch arm64 -arch x86_64'" - name: Build wheel (except macosx_universal2) uses: pypa/cibuildwheel@v2.3.1 @@ -57,7 +57,10 @@ jobs: CIBW_ARCHS_LINUX: x86_64 CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_SKIP: "*musllinux*" - CIBW_BEFORE_ALL_LINUX: yum install -y libuuid-devel + CIBW_BEFORE_ALL_LINUX: "yum install -y libuuid-devel && yum install -y libxml2-devel" + CIBW_BEFORE_BUILD_WINDOWS: "code --install libxml2" + CIBW_ENVIRONMENT_LINUX: "CFLAGS='-I/usr/include/libxml2'" + CIBW_ENVIRONMENT_WINDOWS: "CFLAGS='-I/usr/include/libxml2'" - name: Build sdist (Ubuntu only) if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/run_cvg.yml b/.github/workflows/run_cvg.yml index 1af17316f..0ea1d1ddb 100644 --- a/.github/workflows/run_cvg.yml +++ b/.github/workflows/run_cvg.yml @@ -29,7 +29,6 @@ jobs: if: github.event_name == 'workflow_dispatch' run: | echo "Reason for triggering: ${{ github.event.inputs.reason }}" - - name: Check out uses: actions/checkout@v2 with: @@ -42,22 +41,18 @@ jobs: - name: Build AFDKO wheel env: - CFLAGS: '--coverage' + CFLAGS: '--coverage -I/usr/include/libxml2' run: | python -m pip install --upgrade pip python -m pip install build>=0.7.0 python -m build --wheel - - - name: Install AFDKO wheel run: | python -m pip install dist/*.whl -q - - name: Generate Python and C coverage run: | python -m pip install pytest-cov -q python -m pytest tests --cov --cov-report=xml --color=yes - - name: Upload coverage results run: | bash <(curl -s https://codecov.io/bash) -y .codecov.yml From 36b66453c63ec3157d50f55bcd90a052736e1273 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:28:45 -0700 Subject: [PATCH 3/9] [tx_shared] set up stm_xml_read using libxml2 --- c/shared/include/ctlshare.h | 4 ++++ c/shared/include/tx_shared.h | 3 +++ c/shared/source/tx_shared/tx_shared.c | 23 ++++++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/c/shared/include/ctlshare.h b/c/shared/include/ctlshare.h index 22dd6675b..f5299abbc 100644 --- a/c/shared/include/ctlshare.h +++ b/c/shared/include/ctlshare.h @@ -15,6 +15,9 @@ #endif #include +#include +#include + /* CoreType Library Shared Definitions =================================== This library supplies definitions that are shared between members of the @@ -139,6 +142,7 @@ struct ctlStreamCallbacks_ { int (*seek)(ctlStreamCallbacks *cb, void *stream, long offset); long (*tell)(ctlStreamCallbacks *cb, void *stream); size_t (*read)(ctlStreamCallbacks *cb, void *stream, char **ptr); + size_t (*xml_read)(ctlStreamCallbacks *cb, void *stream, xmlDocPtr *doc); size_t (*write)(ctlStreamCallbacks *cb, void *stream, size_t count, char *ptr); int (*status)(ctlStreamCallbacks *cb, void *stream); diff --git a/c/shared/include/tx_shared.h b/c/shared/include/tx_shared.h index 485c2799f..e9dc2564c 100644 --- a/c/shared/include/tx_shared.h +++ b/c/shared/include/tx_shared.h @@ -59,6 +59,9 @@ #include #endif +#include +#include + /* ----------------------- Miscellaneous Definitions ----------------------- */ #define ARRAY_LEN(t) (sizeof(t) / sizeof((t)[0])) diff --git a/c/shared/source/tx_shared/tx_shared.c b/c/shared/source/tx_shared/tx_shared.c index 16158cb63..daa799406 100644 --- a/c/shared/source/tx_shared/tx_shared.c +++ b/c/shared/source/tx_shared/tx_shared.c @@ -386,7 +386,7 @@ static long stm_tell(ctlStreamCallbacks *cb, void *stream) { } /* Read from stream. */ -static size_t stm_read(ctlStreamCallbacks *cb, void *stream, char **ptr) { +static size_t stm_read(ctlStreamCallbacks *cb, Stream *stream, char **ptr) { Stream *s = stream; switch (s->type) { case stm_Src: @@ -405,6 +405,26 @@ static size_t stm_read(ctlStreamCallbacks *cb, void *stream, char **ptr) { return 0; /* Suppress compiler warning */ } +static size_t stm_xml_read(ctlStreamCallbacks *cb, Stream *stream, xmlDocPtr *doc){ + int res; + xmlParserCtxtPtr ctxt; + + Stream *s = stream; + txCtx h = cb->direct_ctx; + res = fread(s->buf, 1, 4, s->fp); + if (res > 0) { + ctxt = xmlCreatePushParserCtxt(NULL, NULL, + s->buf, res, s->filename); + while ((res = fread(s->buf, 1, BUFSIZ, s->fp)) > 0) { + xmlParseChunk(ctxt, s->buf, res, 0); + } + xmlParseChunk(ctxt, s->buf, 0, 1); + *doc = ctxt->myDoc; + xmlFreeParserCtxt(ctxt); + } + return 0; +} + /* Write to stream. */ static size_t stm_write(ctlStreamCallbacks *cb, void *stream, size_t count, char *ptr) { @@ -501,6 +521,7 @@ void stmInit(txCtx h) { h->cb.stm.seek = stm_seek; h->cb.stm.tell = stm_tell; h->cb.stm.read = stm_read; + h->cb.stm.xml_read = stm_xml_read; h->cb.stm.write = stm_write; h->cb.stm.status = stm_status; h->cb.stm.close = stm_close; From acbdb8ce648d48663ccbd4a9a5ff9b9b2b038eb8 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:46:54 -0700 Subject: [PATCH 4/9] [uforead] Set up libxml2 xml parsing functions --- c/shared/include/uforead.h | 4 + c/shared/source/uforead/uforead.c | 156 ++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/c/shared/include/uforead.h b/c/shared/include/uforead.h index e2b5fdd55..4838c23f9 100644 --- a/c/shared/include/uforead.h +++ b/c/shared/include/uforead.h @@ -125,6 +125,10 @@ void ufoFree(ufoCtx h); /* ufoFree() destroys the library context and all the resources allocated to it. The temporary and debug data streams are closed. */ +static char* parseXMLKeyName(ufoCtx h, xmlNodePtr cur); + +static char* parseXMLKeyValue(ufoCtx h, xmlNodePtr cur); + enum { #undef CTL_DCL_ERR #define CTL_DCL_ERR(name, string) name, diff --git a/c/shared/source/uforead/uforead.c b/c/shared/source/uforead/uforead.c index 81b62331f..fbaf0bc85 100644 --- a/c/shared/source/uforead/uforead.c +++ b/c/shared/source/uforead/uforead.c @@ -945,6 +945,27 @@ static void setFontMatrix(ufoCtx h, abfFontMatrix* fontMatrix, int numElements) static void setFontDictKey(ufoCtx h, char* keyValue) { char* keyName = h->parseKeyName; +/* ToDo: add extra warnings for verbose-output */ +static bool keyValueValid(ufoCtx h, xmlNodePtr cur, char* keyValue, char* keyName){ + bool valid = true; + if (keyValue == NULL) { + if (!parsingValueArray) + valid = false; +// message(h, "Warning: Encountered missing value for fontinfo key %s. Skipping", keyName); + else if (parsingValueArray && h->valueArray.cnt == 0) + valid = false; +// message(h, "Warning: Encountered empty <%s> for fontinfo key %s. Skipping", cur->name, keyName); + } else { + if (!strcmp(keyValue, "")){ + message(h, "Warning: Encountered empty <%s> for fontinfo key %s. Skipping", cur->name, keyName); + valid = false; + } + } + if (!valid) + freeValueArray(h); /* we free h->valueArray after parsing every key to clean up any leftover/invalid data */ + + return valid; +} abfTopDict* top = &h->top; abfFontDict* fd = h->top.FDArray.array + currentiFD; abfPrivateDict* pd = &fd->Private; @@ -1819,6 +1840,141 @@ static void reallocFDArray(ufoCtx h){ h->top.FDArray.array = newFDArray; } +static int parseXMLFile(ufoCtx h, char* filename, const char* filetype){ + xmlDocPtr doc; + xmlNodePtr cur; + char* keyName; + + xmlKeepBlanksDefault(0); + + h->cb.stm.xml_read(&h->cb.stm, h->stm.src, &doc); + + if (doc == NULL) { + fatal(h, ufoErrParse, "Unable to read '%s'.\n", filename); + } + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) { + xmlFreeDoc(doc); + fatal(h, ufoErrSrcStream, "The %s file is empty.\n", filename); + } + + if (!xmlStrEqual((cur)->name, (const xmlChar *) filetype)) { + xmlFreeDoc(doc); + fatal(h, ufoErrSrcStream, "File %s is of the wrong type, root node != %s.\n", filename, filetype); + } + + cur = (cur)->xmlChildrenNode; + while (cur && xmlIsBlankNode(cur)) { + cur = (cur) -> next; + } + + if ( cur == NULL ) { + xmlFreeDoc(doc); + fatal(h, ufoErrSrcStream, "Error parsing XML file %s.\n", filename); + } + + if ((!xmlStrEqual((cur)->name, (const xmlChar *) "dict"))) { + xmlFreeDoc(doc); + fatal(h, ufoErrSrcStream, "Error reading outermost in %s.\n", filename); + } + + cur = cur->xmlChildrenNode; + while (cur != NULL) { + keyName = parseXMLKeyName(h, cur); + cur = cur->next; + if (setFontDictKey(h, keyName, cur) && cur != NULL) + cur = cur->next; + } + return ufoErrSrcStream; +} + +/* ToDo: add extra warnings for verbose-output*/ +static char* parseXMLKeyName(ufoCtx h, xmlNodePtr cur){ + if ((xmlStrEqual(cur->name, (const xmlChar *) "key"))) { + cur = cur->xmlChildrenNode; + if (cur != NULL) { + if (xmlStrEqual(cur->name, (const xmlChar *) "text")) { + return (char*) xmlNodeGetContent(cur); + } else { +// message(h, "Warning: Encountered non-text value %s within .", cur->name); + return NULL; + } + } else { +// message(h, "Warning: Encountered empty ."); + return NULL; + } + } + return NULL; +} + +static void parseXMLArray(ufoCtx h, xmlNodePtr cur){ + dnaSET_CNT(h->valueArray, 0); + parsingValueArray = true; + cur = cur->xmlChildrenNode; + while (cur != NULL) { + char* valueString = parseXMLKeyValue(h, cur); + if (valueString != NULL) + *dnaNEXT(h->valueArray) = valueString; + cur = cur->next; + } +} + +static void parseXMLDict(ufoCtx h, xmlNodePtr cur){ + // go through an XML dict + char* keyName; + cur = cur->xmlChildrenNode; + + if (parsingFDArray){ + currentiFD = currentiFD + 1; + h->top.FDArray.cnt = h->top.FDArray.cnt + 1; + if (h->top.FDArray.cnt > FDArrayInitSize){ /* Memory needs reallocation*/ + reallocFDArray(h); + } + abfFontDict* fd = h->top.FDArray.array + currentiFD; + abfInitFontDict(fd); + } + + while (cur != NULL) { + char* keyName = parseXMLKeyName(h, cur); + cur = cur->next; + if (setFontDictKey(h, keyName, cur) && cur != NULL) + cur = cur->next; + } +} + +static bool isSimpleKey(xmlNodePtr cur){ + if (xmlStrEqual(cur->name, (const xmlChar *) "string" ) || + xmlStrEqual(cur->name, (const xmlChar *) "integer") || + xmlStrEqual(cur->name, (const xmlChar *) "real") || + xmlStrEqual(cur->name, (const xmlChar *) "date")) { + return true; + } else { + return false; + } +} + +static char* parseXMLKeyValue(ufoCtx h, xmlNodePtr cur){ + if (cur == NULL) { + return NULL; + } + if (isSimpleKey(cur)) { /* if string, integer, or real */ + return (char*) xmlNodeGetContent(cur); + } else if (xmlStrEqual(cur->name, (const xmlChar *) "dict")) { + parseXMLDict(h, cur); + return NULL; + } else if (xmlStrEqual(cur->name, (const xmlChar *) "array")) { + parseXMLArray(h, cur); + return NULL; // returning NULL because value is in h->valueArray + } else if (xmlStrEqual(cur->name, (const xmlChar *) "true")) { + return "1"; + } else if (xmlStrEqual(cur->name, (const xmlChar *) "false")) { + return "0"; + } else { + return NULL; + } +} + static int parseFontInfo(ufoCtx h) { int state = 0; /* 0 == start, 1=in first dict, 2 in key, 3= in value, 4=in array 4 in comment, 5 in child dict.*/ int prevState = 0; /* used to save prev state while in comment. */ From 5e1b7424aa5edd0727980791153e3f4709cd03e6 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:50:40 -0700 Subject: [PATCH 5/9] [uforead.c] Update parseFontInfo() with new xml parsing functions --- c/shared/source/uforead/uforead.c | 145 +----------------------------- 1 file changed, 3 insertions(+), 142 deletions(-) diff --git a/c/shared/source/uforead/uforead.c b/c/shared/source/uforead/uforead.c index fbaf0bc85..fd766978f 100644 --- a/c/shared/source/uforead/uforead.c +++ b/c/shared/source/uforead/uforead.c @@ -1976,8 +1976,8 @@ static char* parseXMLKeyValue(ufoCtx h, xmlNodePtr cur){ } static int parseFontInfo(ufoCtx h) { - int state = 0; /* 0 == start, 1=in first dict, 2 in key, 3= in value, 4=in array 4 in comment, 5 in child dict.*/ - int prevState = 0; /* used to save prev state while in comment. */ + const char* filetype = "plist"; + h->src.next = h->mark = NULL; h->cb.stm.clientFileName = "fontinfo.plist"; h->stm.src = h->cb.stm.open(&h->cb.stm, UFO_SRC_STREAM_ID, 0); @@ -1988,149 +1988,10 @@ static int parseFontInfo(ufoCtx h) { } dnaSET_CNT(h->valueArray, 0); - fillbuf(h, 0); - - h->flags &= ~((unsigned long)SEEN_END); - while (!(h->flags & SEEN_END)) { - token* tk; - tk = getToken(h, state); + int parsingSuccess = parseXMLFile(h, h->cb.stm.clientFileName, filetype); - if (tokenEqualStr(tk, "")) { - if (state != 4) { - fatal(h, ufoErrParse, "Encountered end comment token while not in comment, in fontinfo.plist file. Context: '%s'.\n", getBufferContextPtr(h)); - } - state = prevState; - } else if (state == 4) { - continue; - } else if (tokenEqualStr(tk, "")) { - if (state == 3){ - state = 5; - if (parsingFDArray){ - if (prevState == 5) { // NOT first fdict in FDArray - currentiFD = currentiFD + 1; - h->top.FDArray.cnt = h->top.FDArray.cnt + 1; - if (h->top.FDArray.cnt > FDArrayInitSize){ /* Memory needs reallocation*/ - reallocFDArray(h); - } - abfFontDict* fd = h->top.FDArray.array + currentiFD; - abfInitFontDict(fd); - } else { - h->top.FDArray.array = memNew(h, FDArrayInitSize *sizeof(abfFontDict)); - if (h->top.version.ptr != NULL) - h->top.cid.CIDFontVersion = atoi(h->top.version.ptr) % 10 + (float) atoi(&h->top.version.ptr[2])/1000; - abfInitFontDict(h->top.FDArray.array); - } - } - }else if (state == 5){ - state = 6; - }else{ - state = 1; - } - } else if (tokenEqualStr(tk, "")) { - if (state == 6){ - state = 5; - } else if (state == 5){ - prevState = state; - state = 3; - } else{ - break; - } - } else if (tokenEqualStr(tk, "")) { - if (state != 1 && state < 5) { - fatal(h, ufoErrParse, "Encountered '' while not in top level of first , in fontinfo.plist file. Context: '%s'.\n", getBufferContextPtr(h)); - } - // get key name - tk = getElementValue(h, state); - if (tokenEqualStr(tk, "")) { - message(h, "Warning: Encountered empty . Text: '%s'.", getBufferContextPtr(h)); - } else { - h->parseKeyName = copyStr(h, tk->val); // get a copy in memory. This is freed when the value is assigned. - // get end-key. - tk = getToken(h, state); - if (!tokenEqualStr(tk, "")) { - tk->val[tk->length - 1] = 0; - fatal(h, ufoErrParse, "Encountered element other than when reading name: %s, in fontinfo.plist file. Context: '%s'.\n", tk->val, getBufferContextPtr(h)); - } - } - if (state != 5 && state != 6){ - state = 2; - } - } else if (tokenEqualStr(tk, "")) { - if (state != 2 && state < 5) { - fatal(h, ufoErrParse, "Encountered when not after element, in fontinfo.plist file. Context: '%s'.\n", getBufferContextPtr(h)); - } else { - /* check if parsing FDArray */ - if (!strcmp(h->parseKeyName, "postscriptFDArray")) - parsingFDArray = true; - if (state >= 5){ - prevState = state; - } - state = 3; - } - dnaSET_CNT(h->valueArray, 0); - } else if (tokenEqualStr(tk, "")) { - if (state == 5) { - if (parsingFDArray) - parsingFDArray = false; - if ( h->top.FDArray.array != &h->fdict ) { // if more memory was allocated for FDArray - memFree(h, h->top.FDArray.array); - } - state = 1; - } else if (state != 3) { - fatal(h, ufoErrParse, "Encountered when not after element, in fontinfo.plist file. Context: '%s'.\n", getBufferContextPtr(h)); - } else { - if (h->parseKeyName == NULL) - break; - setFontDictKey(h, NULL); - if (prevState >= 5){ - state = prevState; - }else{ - state = 1; - } - } - } else if (tokenEqualStr(tk, "")) { - if (state != 2 && state != 5) { - fatal(h, ufoErrParse, "Encountered when not after element, in fontinfo.plist file. Context: '%s'.\n", getBufferContextPtr(h)); - } else { - dnaSET_CNT(h->valueArray, 0); - setFontDictKey(h, NULL); - state = 1; - } - } else if (tokenEqualStr(tk, "")) { - state = doFontDictValue(h, "", "", state); - } else if (tokenEqualStr(tk, "")) { - state = doFontDictValue(h, "", "", state); - } else if (tokenEqualStr(tk, "")) { - state = doFontDictValue(h, "", "", state); - } else if (tokenEqualStr(tk, "")) { - state = doFontDictValue(h, "", "", state); - } else if (tokenEqualStr(tk, "")) { - message(h, "Warning: encountered element: skipping."); - } else if (tokenEqualStr(tk, "")) { - setFontDictKey(h, "0"); - state--; - } else if (tokenEqualStr(tk, "")) { - setFontDictKey(h, "1"); - state--; - } else if (state != 0) { - tk->val[tk->length - 1] = 0; - message(h, "Warning: discarding token '%s', in fontinfo.plist file. Context: '%s'.", tk->val, getBufferContextPtr(h)); - if (state == 2) - state = 1; - else if (state == 3) - state = 2; - } - } /* end while more tokens */ - - /* Currently, proscriptStdHW and postscriptStdVW have to be hand-edited in. If they haven't been provided, - use the first value of the stemsnap entries. - */ fixUnsetDictValues(h); - h->cb.stm.close(&h->cb.stm, h->stm.src); h->stm.src = NULL; return ufoSuccess; From 77278de55deb2519f5aa8320e7c59e0297babbb5 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:52:49 -0700 Subject: [PATCH 6/9] [uforead] Update setFontDictKey() and related functions for new xml-parsing functions --- c/shared/include/uforead.h | 3 + c/shared/source/uforead/uforead.c | 349 +++++++++++++++--------------- 2 files changed, 178 insertions(+), 174 deletions(-) diff --git a/c/shared/include/uforead.h b/c/shared/include/uforead.h index 4838c23f9..b7dcdfc04 100644 --- a/c/shared/include/uforead.h +++ b/c/shared/include/uforead.h @@ -6,6 +6,7 @@ #define UFOREAD_H #include "ctlshare.h" +#include #define UFO_VERSION CTL_MAKE_VERSION(1, 1, 2) @@ -129,6 +130,8 @@ static char* parseXMLKeyName(ufoCtx h, xmlNodePtr cur); static char* parseXMLKeyValue(ufoCtx h, xmlNodePtr cur); +static bool setFontDictKey(ufoCtx h, char* keyName, xmlNodePtr cur); + enum { #undef CTL_DCL_ERR #define CTL_DCL_ERR(name, string) name, diff --git a/c/shared/source/uforead/uforead.c b/c/shared/source/uforead/uforead.c index fd766978f..4feabff4e 100644 --- a/c/shared/source/uforead/uforead.c +++ b/c/shared/source/uforead/uforead.c @@ -39,7 +39,6 @@ #include #include #include -#include enum { ufoUnknown, @@ -58,6 +57,7 @@ long CIDCount = 0; int currentiFD = 0; int FDArrayInitSize = 50; bool parsingFDArray = false; +bool parsingValueArray = false; typedef struct { @@ -923,28 +923,49 @@ static char* getKeyValue(ufoCtx h, char* endName, int state) { return value; } -static void setBluesArrayValue(ufoCtx h, BluesArray* bluesArray, int numElements) { +/* free dynamic valueArray and set cnt to 0 */ +static void freeValueArray(ufoCtx h){ + if (h->valueArray.cnt != 0){ + int i = 0; + while ((i < h->valueArray.cnt)) { + memFree(h, h->valueArray.array[i]); + i++; + } + dnaSET_CNT(h->valueArray, 0); + } + parsingValueArray = false; +} + +/* ToDo: add extra warnings for verbose-output */ +static void setBluesArrayValue(ufoCtx h, BluesArray* bluesArray, int numElements, char* arrayKeyName) { int i = 0; + if (h->valueArray.cnt == 0) { +// message(h, "Warning: Encountered empty or invalid array for %s. Skipping", arrayKeyName); + return; + } bluesArray->cnt = h->valueArray.cnt; while ((i < h->valueArray.cnt) && (i < numElements)) { bluesArray->array[i] = (float)atof(h->valueArray.array[i]); - memFree(h, h->valueArray.array[i]); i++; } + freeValueArray(h); } +/* ToDo: add extra warnings for verbose-output */ static void setFontMatrix(ufoCtx h, abfFontMatrix* fontMatrix, int numElements) { int i = 0; + if (h->valueArray.cnt == 0) { +// message(h, "Warning: Encountered empty or invalid array for FontMatrix. Skipping"); + return; + } fontMatrix->cnt = h->valueArray.cnt; while ((i < h->valueArray.cnt) && (i < numElements)) { fontMatrix->array[i] = (float)atof(h->valueArray.array[i]); - memFree(h, h->valueArray.array[i]); i++; } + freeValueArray(h); } -static void setFontDictKey(ufoCtx h, char* keyValue) { - char* keyName = h->parseKeyName; /* ToDo: add extra warnings for verbose-output */ static bool keyValueValid(ufoCtx h, xmlNodePtr cur, char* keyValue, char* keyName){ bool valid = true; @@ -966,182 +987,162 @@ static bool keyValueValid(ufoCtx h, xmlNodePtr cur, char* keyValue, char* keyNam return valid; } + +static bool setFontDictKey(ufoCtx h, char* keyName, xmlNodePtr cur) { + /* returns false when current key is NULL/ not parseable, + otherwise returns true */ abfTopDict* top = &h->top; abfFontDict* fd = h->top.FDArray.array + currentiFD; abfPrivateDict* pd = &fd->Private; BluesArray* bluesArray; abfFontMatrix* fontMatrix; - /* If we do not use a keyValue, we need to dispose of it - */ - if (!strcmp(keyName, "copyright")) { - top->Copyright.ptr = keyValue; - } else if (!strcmp(keyName, "trademark")) { - char* copySymbol; - top->Notice.ptr = keyValue; - /* look for the (c) symbol U+00A9, which is 0xC2, 0xA9 in UTF-8 */ - copySymbol = strstr(keyValue, "\xC2\xA9"); - if (copySymbol != NULL) { - /* if there is a copyright symbol (U+00A9), - replace it with the word "Copyright" */ - char* cpy = "Copyright"; - char* newString = memNew(h, strlen(cpy) + strlen(keyValue) + 2); - /* set the 0xC2 to NULL to terminate the left side of the string */ - *copySymbol = '\0'; - /* use copySymbol + 2 to skip the NULL and the 0xA9 - to get the right side of the string */ - sprintf(newString, "%s%s%s", keyValue, "Copyright", copySymbol + 2); - top->Notice.ptr = newString; - } - } else if (!strcmp(keyName, "versionMajor")) { - if (top->version.ptr == NULL) - top->version.ptr = keyValue; - else { - char* newString = memNew(h, strlen(top->version.ptr) + strlen(keyValue) + 2); - sprintf(newString, "%s.%s", keyValue, top->version.ptr); - memFree(h, top->version.ptr); - top->version.ptr = newString; - memFree(h, keyValue); - } - } else if (!strcmp(keyName, "versionMinor")) { - if (top->version.ptr == NULL) - top->version.ptr = keyValue; - else { - char* newString = memNew(h, strlen(top->version.ptr) + strlen(keyValue) + 2); - sprintf(newString, "%s.%s", top->version.ptr, keyValue); - memFree(h, top->version.ptr); - top->version.ptr = newString; - memFree(h, keyValue); - } - } else if (!strcmp(keyName, "postscriptFontName")) { - fd->FontName.ptr = keyValue; - } else if (!strcmp(keyName, "openTypeNamePreferredFamilyName")) { - top->FamilyName.ptr = keyValue; - } else if (!strcmp(keyName, "familyName")) { - if (top->FamilyName.ptr == NULL) // we don't re-set this if it was set by "openTypeNamePreferredFamilyName" - top->FamilyName.ptr = keyValue; - else - memFree(h, keyValue); - } else if (!strcmp(keyName, "postscriptFullName")) { - top->FullName.ptr = keyValue; - } else if (!strcmp(keyName, "postscriptWeightName")) { - top->Weight.ptr = keyValue; - } else if (!strcmp(keyName, "postscriptIsFixedPitch")) { - top->isFixedPitch = atol(keyValue); - } else if (!strcmp(keyName, "FSType")) { - top->FSType = atoi(keyValue); - } else if (!strcmp(keyName, "italicAngle")) { - top->ItalicAngle = (float)strtod(keyValue, NULL); - } else if (!strcmp(keyName, "postscriptUnderlinePosition")) { - top->UnderlinePosition = (float)strtod(keyValue, NULL); - } else if (!strcmp(keyName, "postscriptUnderlineThickness")) { - top->UnderlineThickness = (float)strtod(keyValue, NULL); - } else if (!strcmp(keyName, "unitsPerEm")) { - double ppem = strtod(keyValue, NULL); - top->sup.UnitsPerEm = (int)ppem; - fd->FontMatrix.cnt = 6; - fd->FontMatrix.array[0] = (float)(1.0 / ppem); - fd->FontMatrix.array[1] = 0; - fd->FontMatrix.array[2] = 0; - fd->FontMatrix.array[3] = (float)(1.0 / ppem); - fd->FontMatrix.array[4] = 0; - fd->FontMatrix.array[5] = 0; - memFree(h, keyValue); - } else if (!strcmp(keyName, "FontName")) { - fd->FontName.ptr = keyValue; - } else if (!strcmp(keyName, "PaintType")) { - fd->PaintType = atoi(keyValue); - } else if (!strcmp(keyName, "FontMatrix")) { - fontMatrix = &fd->FontMatrix; - setFontMatrix(h, fontMatrix, 6); - } else if (!strcmp(keyName, "postscriptBlueFuzz")) { - pd->BlueFuzz = (float)strtod(keyValue, NULL); - memFree(h, keyValue); - } else if (!strcmp(keyName, "postscriptBlueShift")) { - pd->BlueShift = (float)strtod(keyValue, NULL); - memFree(h, keyValue); - } else if (!strcmp(keyName, "postscriptBlueScale")) { - pd->BlueScale = (float)strtod(keyValue, NULL); - memFree(h, keyValue); - } else if (!strcmp(keyName, "postscriptForceBold")) { - pd->ForceBold = atol(keyValue); - } else if (!strcmp(keyName, "postscriptBlueValues")) { - bluesArray = (BluesArray*)&pd->BlueValues; - setBluesArrayValue(h, bluesArray, 14); - } else if (!strcmp(keyName, "postscriptOtherBlues")) { - bluesArray = (BluesArray*)&pd->OtherBlues; - setBluesArrayValue(h, bluesArray, 10); - } else if (!strcmp(keyName, "postscriptFamilyBlues")) { - bluesArray = (BluesArray*)&pd->FamilyBlues; - setBluesArrayValue(h, bluesArray, 14); - } else if (!strcmp(keyName, "postscriptFamilyOtherBlues")) { - bluesArray = (BluesArray*)&pd->FamilyOtherBlues; - setBluesArrayValue(h, bluesArray, 10); - } else if (!strcmp(keyName, "postscriptStdHW")) { - if (keyValue != NULL){ - pd->StdHW = (float)strtod(keyValue, NULL); - memFree(h, keyValue); - } else { - pd->StdHW = (float)strtod(h->valueArray.array[0], NULL); - memFree(h, h->valueArray.array[0]); - } - } else if (!strcmp(keyName, "postscriptStdVW")) { - if (keyValue != NULL){ - pd->StdVW = (float)strtod(keyValue, NULL); - memFree(h, keyValue); - } else { - pd->StdVW = (float)strtod(h->valueArray.array[0], NULL); - memFree(h, h->valueArray.array[0]); - } - } else if (!strcmp(keyName, "postscriptStemSnapH")) { - bluesArray = (BluesArray*)&pd->StemSnapH; - setBluesArrayValue(h, bluesArray, 12); - } else if (!strcmp(keyName, "postscriptStemSnapV")) { - bluesArray = (BluesArray*)&pd->StemSnapV; - setBluesArrayValue(h, bluesArray, 12); - } else if (!strcmp(keyName, "LanguageGroup")) { - pd->LanguageGroup = (float)strtod(keyValue, NULL); - h->parseKeyName = NULL; - memFree(h, keyValue); - } else if (!strcmp(keyName, "ExpansionFactor")) { - pd->ExpansionFactor = (float)strtod(keyValue, NULL); - h->parseKeyName = NULL; - memFree(h, keyValue); - } else { - // if it isn't used, free the string. - memFree(h, keyValue); - } -} - -static int doFontDictValue(ufoCtx h, char* keyName, char* endKeyName, int state) { - char* valueString = getKeyValue(h, endKeyName, state); - if (valueString == NULL) { - if (strcmp(h->parseKeyName, "styleName")) { - message(h, "Warning: Encountered empty %s for fontinfo key %s. Skipping", keyName, h->parseKeyName); - /* It is valid and common for styleName can be present and empty, when the style is "Regular".*/ - } + if (keyName == NULL){ + return false; } - - if (state == 2) // we are processing a key value. - { - if (valueString != NULL) - setFontDictKey(h, valueString); - state = 1; - memFree(h, h->parseKeyName); - } else if (state == 3) // we are within an , which is a key value - { - if (valueString != NULL) - *dnaNEXT(h->valueArray) = valueString; - } else if (state >= 5) // we are within a within an (an fDict in an FDArray), which is a key value - { - if (valueString != NULL) { - setFontDictKey(h, valueString); - } + if (!strcmp(keyName, "postscriptFDArray")) { + h->top.FDArray.array = memNew(h, FDArrayInitSize *sizeof(abfFontDict)); + if (h->top.version.ptr != NULL) + h->top.cid.CIDFontVersion = atoi(h->top.version.ptr) % 10 + (float) atoi(&h->top.version.ptr[2])/1000; + abfInitFontDict(h->top.FDArray.array); + + parsingFDArray = true; + currentiFD = -1; + parseXMLKeyValue(h, cur); + parsingFDArray = false; + } else if (!strcmp(keyName, "PrivateDict")) { + parsingFDArray = false; + parseXMLKeyValue(h, cur); + parsingFDArray = true; } else { - memFree(h, h->parseKeyName); - fatal(h, ufoErrParse, "Encountered key value when not after or element. Text: '%s'.", getBufferContextPtr(h)); - } - return state; + char* keyValue = parseXMLKeyValue(h, cur); + if (!keyValueValid(h, cur, keyValue, keyName)) + return false; + if (!strcmp(keyName, "copyright")) { + top->Copyright.ptr = keyValue; + } else if (!strcmp(keyName, "trademark")) { + char* copySymbol; + top->Notice.ptr = keyValue; + /* look for the (c) symbol U+00A9, which is 0xC2, 0xA9 in UTF-8 */ + copySymbol = strstr(keyValue, "\xC2\xA9"); + if (copySymbol != NULL) { + /* if there is a copyright symbol (U+00A9), + replace it with the word "Copyright" */ + char* cpy = "Copyright"; + char* newString = memNew(h, strlen(cpy) + strlen(keyValue) + 2); + /* set the 0xC2 to NULL to terminate the left side of the string */ + *copySymbol = '\0'; + /* use copySymbol + 2 to skip the NULL and the 0xA9 + to get the right side of the string */ + sprintf(newString, "%s%s%s", keyValue, "Copyright", copySymbol + 2); + top->Notice.ptr = newString; + } + } else if (!strcmp(keyName, "versionMajor")) { + if (top->version.ptr == NULL) + top->version.ptr = keyValue; + else { + char* newString = memNew(h, strlen(top->version.ptr) + strlen(keyValue) + 2); + sprintf(newString, "%s.%s", keyValue, top->version.ptr); + memFree(h, top->version.ptr); + top->version.ptr = newString; + } + } else if (!strcmp(keyName, "versionMinor")) { + if (top->version.ptr == NULL) + top->version.ptr = keyValue; + else { + char* newString = memNew(h, strlen(top->version.ptr) + strlen(keyValue) + 2); + sprintf(newString, "%s.%s", top->version.ptr, keyValue); + memFree(h, top->version.ptr); + top->version.ptr = newString; + } + } else if (!strcmp(keyName, "postscriptFontName")) { + fd->FontName.ptr = keyValue; + } else if (!strcmp(keyName, "openTypeNamePreferredFamilyName")) { + top->FamilyName.ptr = keyValue; + } else if (!strcmp(keyName, "familyName")) { + if (top->FamilyName.ptr == NULL) // we don't re-set this if it was set by "openTypeNamePreferredFamilyName" + top->FamilyName.ptr = keyValue; + } else if (!strcmp(keyName, "postscriptFullName")) { + top->FullName.ptr = keyValue; + } else if (!strcmp(keyName, "postscriptWeightName")) { + top->Weight.ptr = keyValue; + } else if (!strcmp(keyName, "postscriptIsFixedPitch")) { + top->isFixedPitch = atol(keyValue); + } else if (!strcmp(keyName, "FSType")) { + top->FSType = atoi(keyValue); + } else if (!strcmp(keyName, "italicAngle")) { + top->ItalicAngle = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "postscriptUnderlinePosition")) { + top->UnderlinePosition = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "postscriptUnderlineThickness")) { + top->UnderlineThickness = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "unitsPerEm")) { + double ppem = strtod(keyValue, NULL); + top->sup.UnitsPerEm = (int)ppem; + fd->FontMatrix.cnt = 6; + fd->FontMatrix.array[0] = (float)(1.0 / ppem); + fd->FontMatrix.array[1] = 0; + fd->FontMatrix.array[2] = 0; + fd->FontMatrix.array[3] = (float)(1.0 / ppem); + fd->FontMatrix.array[4] = 0; + fd->FontMatrix.array[5] = 0; + } else if (!strcmp(keyName, "FontName")) { + fd->FontName.ptr = keyValue; + } else if (!strcmp(keyName, "PaintType")) { + fd->PaintType = atoi(keyValue); + } else if (!strcmp(keyName, "FontMatrix")) { + fontMatrix = &fd->FontMatrix; + setFontMatrix(h, fontMatrix, 6); + } else if (!strcmp(keyName, "postscriptBlueFuzz")) { + pd->BlueFuzz = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "postscriptBlueShift")) { + pd->BlueShift = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "postscriptBlueScale")) { + pd->BlueScale = (float)strtod(keyValue, NULL); + } else if (!strcmp(keyName, "postscriptForceBold")) { + pd->ForceBold = atol(keyValue); + } else if (!strcmp(keyName, "postscriptBlueValues")) { + bluesArray = (BluesArray*)&pd->BlueValues; + setBluesArrayValue(h, bluesArray, 14, keyName); + } else if (!strcmp(keyName, "postscriptOtherBlues")) { + bluesArray = (BluesArray*)&pd->OtherBlues; + setBluesArrayValue(h, bluesArray, 10, keyName); + } else if (!strcmp(keyName, "postscriptFamilyBlues")) { + bluesArray = (BluesArray*)&pd->FamilyBlues; + setBluesArrayValue(h, bluesArray, 14, keyName); + } else if (!strcmp(keyName, "postscriptFamilyOtherBlues")) { + bluesArray = (BluesArray*)&pd->FamilyOtherBlues; + setBluesArrayValue(h, bluesArray, 10, keyName); + } else if (!strcmp(keyName, "postscriptStdHW")) { + if (keyValue != NULL) { + pd->StdHW = (float)strtod(keyValue, NULL); + } else { + pd->StdHW = (float)strtod(h->valueArray.array[0], NULL); + freeValueArray(h); + } + } else if (!strcmp(keyName, "postscriptStdVW")) { + if (keyValue != NULL) { + pd->StdVW = (float)strtod(keyValue, NULL); + } else { + pd->StdVW = (float)strtod(h->valueArray.array[0], NULL); + freeValueArray(h); + } + } else if (!strcmp(keyName, "postscriptStemSnapH")) { + bluesArray = (BluesArray*)&pd->StemSnapH; + setBluesArrayValue(h, bluesArray, 12, keyName); + } else if (!strcmp(keyName, "postscriptStemSnapV")) { + bluesArray = (BluesArray*)&pd->StemSnapV; + setBluesArrayValue(h, bluesArray, 12, keyName); + } else if (!strcmp(keyName, "LanguageGroup")) { + pd->LanguageGroup = (float)strtod(keyValue, NULL); + h->parseKeyName = NULL; + } else if (!strcmp(keyName, "ExpansionFactor")) { + pd->ExpansionFactor = (float)strtod(keyValue, NULL); + h->parseKeyName = NULL; + } + freeValueArray(h); + } + return true; } static int CTL_CDECL cmpOrderRecs(const void* first, const void* second, void* ctx) { From c727192705082a96bc02fd243cf460400af22069 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 13:53:26 -0700 Subject: [PATCH 7/9] [uforead.c] Free FDArray --- c/shared/source/uforead/uforead.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c/shared/source/uforead/uforead.c b/c/shared/source/uforead/uforead.c index 4feabff4e..ec8da8667 100644 --- a/c/shared/source/uforead/uforead.c +++ b/c/shared/source/uforead/uforead.c @@ -407,6 +407,10 @@ void ufoFree(ufoCtx h) { freeStrings(h); dnaFree(h->dna); + if (h->top.FDArray.array != &h->fdict){ // if more memory was allocated for FDArray + memFree(h, h->top.FDArray.array); + } + /* Close debug stream */ if (h->stm.dbg != NULL) (void)h->cb.stm.close(&h->cb.stm, h->stm.dbg); From a5a343a962576eed0a21659347cec83e73e056b2 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 14:02:06 -0700 Subject: [PATCH 8/9] [tx_test] Test UFO fontinfo.plist parsing --- .../bluesarray-string.subset | Bin 0 -> 56829 bytes .../ufo-fontinfo-parsing/empty-dict.subset | Bin 0 -> 56155 bytes .../empty-key-name-fdarray.subset | Bin 0 -> 56829 bytes .../empty-key-name.subset | Bin 0 -> 56254 bytes .../empty-key-value.subset | Bin 0 -> 56254 bytes .../fontmatrix-string.subset | Bin 0 -> 56287 bytes .../invalid-key-name.subset | Bin 0 -> 56254 bytes .../missing-key-name-2.subset | Bin 0 -> 56155 bytes .../missing-key-name.subset | Bin 0 -> 56188 bytes .../missing-key-value-2.subset | Bin 0 -> 56155 bytes .../missing-key-value.subset | Bin 0 -> 56254 bytes .../switched-string-and-array.subset | Bin 0 -> 56829 bytes .../bluesarray-string.ufo/fontinfo.plist | 26 +++ .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../bluesarray-string.ufo/lib.plist | 21 +++ .../bluesarray-string.ufo/metainfo.plist | 10 ++ .../empty-dict.ufo/fontinfo.plist | 6 + .../empty-dict.ufo/glyphs/cid00000.glif | 40 +++++ .../empty-dict.ufo/glyphs/cid17899.glif | 121 +++++++++++++ .../empty-dict.ufo/glyphs/cid17900.glif | 163 ++++++++++++++++++ .../empty-dict.ufo/glyphs/cid17901.glif | 147 ++++++++++++++++ .../empty-dict.ufo/glyphs/contents.plist | 14 ++ .../empty-dict.ufo/lib.plist | 21 +++ .../empty-dict.ufo/metainfo.plist | 10 ++ .../empty-key-name-fdarray.ufo/fontinfo.plist | 27 +++ .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../empty-key-name-fdarray.ufo/lib.plist | 21 +++ .../empty-key-name-fdarray.ufo/metainfo.plist | 10 ++ .../empty-key-name.ufo/fontinfo.plist | 10 ++ .../empty-key-name.ufo/glyphs/cid00000.glif | 40 +++++ .../empty-key-name.ufo/glyphs/cid17899.glif | 121 +++++++++++++ .../empty-key-name.ufo/glyphs/cid17900.glif | 163 ++++++++++++++++++ .../empty-key-name.ufo/glyphs/cid17901.glif | 147 ++++++++++++++++ .../empty-key-name.ufo/glyphs/contents.plist | 14 ++ .../empty-key-name.ufo/lib.plist | 21 +++ .../empty-key-name.ufo/metainfo.plist | 10 ++ .../empty-key-value.ufo/fontinfo.plist | 10 ++ .../empty-key-value.ufo/glyphs/cid00000.glif | 40 +++++ .../empty-key-value.ufo/glyphs/cid17899.glif | 121 +++++++++++++ .../empty-key-value.ufo/glyphs/cid17900.glif | 163 ++++++++++++++++++ .../empty-key-value.ufo/glyphs/cid17901.glif | 147 ++++++++++++++++ .../empty-key-value.ufo/glyphs/contents.plist | 14 ++ .../empty-key-value.ufo/lib.plist | 21 +++ .../empty-key-value.ufo/metainfo.plist | 10 ++ .../fontmatrix-string.ufo/fontinfo.plist | 17 ++ .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../fontmatrix-string.ufo/lib.plist | 21 +++ .../fontmatrix-string.ufo/metainfo.plist | 10 ++ .../invalid-key-name.ufo/fontinfo.plist | 10 ++ .../invalid-key-name.ufo/glyphs/cid00000.glif | 40 +++++ .../invalid-key-name.ufo/glyphs/cid17899.glif | 121 +++++++++++++ .../invalid-key-name.ufo/glyphs/cid17900.glif | 163 ++++++++++++++++++ .../invalid-key-name.ufo/glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../invalid-key-name.ufo/lib.plist | 21 +++ .../invalid-key-name.ufo/metainfo.plist | 10 ++ .../missing-key-name-2.ufo/fontinfo.plist | 7 + .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../missing-key-name-2.ufo/lib.plist | 21 +++ .../missing-key-name-2.ufo/metainfo.plist | 10 ++ .../missing-key-name.ufo/fontinfo.plist | 9 + .../missing-key-name.ufo/glyphs/cid00000.glif | 40 +++++ .../missing-key-name.ufo/glyphs/cid17899.glif | 121 +++++++++++++ .../missing-key-name.ufo/glyphs/cid17900.glif | 163 ++++++++++++++++++ .../missing-key-name.ufo/glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../missing-key-name.ufo/lib.plist | 21 +++ .../missing-key-name.ufo/metainfo.plist | 10 ++ .../missing-key-value-2.ufo/fontinfo.plist | 7 + .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../missing-key-value-2.ufo/lib.plist | 21 +++ .../missing-key-value-2.ufo/metainfo.plist | 10 ++ .../missing-key-value.ufo/fontinfo.plist | 9 + .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../missing-key-value.ufo/lib.plist | 21 +++ .../missing-key-value.ufo/metainfo.plist | 10 ++ .../fontinfo.plist | 34 ++++ .../glyphs/cid00000.glif | 40 +++++ .../glyphs/cid17899.glif | 121 +++++++++++++ .../glyphs/cid17900.glif | 163 ++++++++++++++++++ .../glyphs/cid17901.glif | 147 ++++++++++++++++ .../glyphs/contents.plist | 14 ++ .../switched-string-and-array.ufo/lib.plist | 21 +++ .../metainfo.plist | 10 ++ tests/tx_test.py | 37 ++++ 109 files changed, 6401 insertions(+) create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/bluesarray-string.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-dict.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-key-name-fdarray.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-key-name.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-key-value.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/fontmatrix-string.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/invalid-key-name.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-name-2.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-name.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-value-2.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-value.subset create mode 100644 tests/tx_data/expected_output/ufo-fontinfo-parsing/switched-string-and-array.subset create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/metainfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid00000.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17899.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17900.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17901.glif create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/lib.plist create mode 100644 tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/metainfo.plist diff --git a/tests/tx_data/expected_output/ufo-fontinfo-parsing/bluesarray-string.subset b/tests/tx_data/expected_output/ufo-fontinfo-parsing/bluesarray-string.subset new file mode 100644 index 0000000000000000000000000000000000000000..d08b61add47c99807cdf6178e0fa152c8474da44 GIT binary patch literal 56829 zcmeIzdr(tX9tUu(t)ubLb`;mDYY)`yf=Wn;Kmt{pfGDCQ5)s9shU5a#(YT2Zku+ueKfKst5z-`zjH6NcP# z&hNZF=XXzp?rM#6GVgTq2X%`__zDneAOWG!Q0sX*c>5s5`o zKQDn$7;LtrFouLgHjwl`5?`^eFR>3sG$~e=GLbM^XJ#yBM$1xq5m6Y8#NNqD7|Kd9 zNn9m2R)|?=Gf^}fK~Z{2?^=R2kf<56PD8Q8lUq#~ZD9F{xe<*vJ>`med61GyFwieT zoSPw@3k|fvq&0d+g{t_m78_V2zpVk)&gF;cx%C*>6e8y1mQaknL(vg3UH=HIe|i*jX1EqF@+p3h^ac{#(HBR&38r`$_W)4dJi_PV)g6 ze3Ko|Ihk5(a8@`q`GAF5mN6ug<^1tVI0f$GdWy9#ihm32GpQLv5|_*N$+*+E7l`av zN1!y?s3ltNpOqVwh#iCYXjuKcXtG@D=PX;aR_j_bqbGhcsob%7E;B+YEo);a4&9$f z{GHS)Hj!d9wm8PRJT2Y+vD#lSKE-^v9Z?LeHQMuS4Q*aa6WYwCSBk8$LNpPkER2=5>V%B^A7mu=10WRIZYKu=lAotNYfa6&r)cAgHC5M4pV%KRywa4*KZMz%{MjdO zhLi-Y9n>&%P{UIEK>z{}fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$## zAOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;| zfB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U< z00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa z0SG_<0uX=z1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=tvMO&U{pXt3f`^Mtp_sh2w$^UTDnx3{uk`;D;vAm--@8-FhS#K!YMQ=@D zby-8Z%DTS39s6a`c~wQFB|nooxTj;~yhqvX1(qw~UZ3vhCqI4848HI%>Mm7xr>yg| z-MhDWv*v0_li@>6QL#OL_OW`eW?N@SUwq!riN|i0oEekz7n_e;&ey7Ct@SYhYn~k* z^&s}Z^7`G+KKfZ_U+xp`T2uFTa7=i$TjCq-}XdpNldgnD)@Y1SETk3ikLOW ze8-C}pWL;*>v>&9^A!5XwyL9&9QAI!;*Rwj@kDX=gWTCU%KS#ruC6Vb{E?e;Z@l?^ hV(*p589gGgcrI-W)^mF2Qv_vW?5u$jTG|lNe*q&UVw?Z~ literal 0 HcmV?d00001 diff --git a/tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-key-name-fdarray.subset b/tests/tx_data/expected_output/ufo-fontinfo-parsing/empty-key-name-fdarray.subset new file mode 100644 index 0000000000000000000000000000000000000000..c73fe5d0ece8229e7e3c33c02ef29b4821fb14dc GIT binary patch literal 56829 zcmeIydr(tX9tUu(t)ubLb`;mDYY)`yf=Wn;JOcHR1W`muBqEAM4ao(f$xV85gFFTw zw213ecR^hh*G?-aprRrw_<**8RnRVi3RPL8fUve(wW4BSw!8P{fpoUJ|Lo4}Ki^3v zx##&i=W~Ad2;J2hZ@JzaM|n#{ViHMN%{E3yc`L(0Ld`TQ5XwVTtYjTyV5uPDDG`Z9 zQa>+&P^dIpQW!%*A{#{dABnHn*O%BQBbpQ|OPNR*tur$gGoxiGy@<$-Mq(diB@AVy zm?W-}n=8buvzaKGji4w!rFSjC8bs8LS*M{`;>oQhj5e@*U~WdEO;5Rc{c zc5!ZocrG%~29wt49TlqL=UQT5jr_I-R6Ca+rsvjUU{i>g@3)j=sE|AP1dV`L2miQsOXN1;75ubta^i;fkLcY}*#}S4MY*~_G zp@_J@%Ap%Z$D4`N5k_ybxI#s8@vSVALOkt9;pG^mV)PVapc9CvYj4g5jm=^)QoO%2 z07dH^L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|7bWBJ4qrUn9h82zzi4ax{_v){O6o;c^h&Nf;PxABGbV++DbqfD zZ;oT{o|r}*D}tm>=?Z?t!st;@7FbnuMe3}-;i2d@^9tgGN;Pugkx?KC6`a` z+TQ)VKC@*SePmnpQF*TaZmstn^EcAT(w+x-b92=NO_E*RTLKD3Z_c~%=J$zxR~~2f bN~F^Hv_4SFX>Cv8l!dXfI!YL6f+YU|Ea{Hx literal 0 HcmV?d00001 diff --git a/tests/tx_data/expected_output/ufo-fontinfo-parsing/invalid-key-name.subset b/tests/tx_data/expected_output/ufo-fontinfo-parsing/invalid-key-name.subset new file mode 100644 index 0000000000000000000000000000000000000000..3ec1e10a9500d9e6c22b3b2e2babb44331e68e1d GIT binary patch literal 56254 zcmeIyi&qm@9tUu(tw-ad?NMB-uDwvRfA{E;CsR$bLal% z{(kp!e-p8@Cc+~?&%{z5UJ@Azr!0(>)lnXSAwj_m&56VTL26E(#2PrtkGRSuGKrVB zn@B7UVsus$MRQ>krKj`*k6HYPhGldS6h~b76+&nOCj^JkI-^xj4MhF-AQcsFpkIYJ z3Lvga479| z%UcmC7LGE7&~Xg$vZv8o%>${z`TQ1+O(Cwfy|~$*QnPxBHPG?IbzpCfi3qFNY@`H# zM*@o0+aD21QmL3^k|y^i9&%3^Q7U|iLLp0kHE*lIvDHB}gfW~!NAU;8m{V9od;&*2 zW%5}bo-%$ByRd5l$C>@4(xjv$iB{+tiHcq_b= z_RaE*8%$|AD@*Y`;X~v;j!sYutP$2&*0L%s-S)BAI#fs`<##}_wAN_Lx}Ii|XhJhw znwc>ZukXY`WJ)KLEVXc2mNPQC^~APR+MpW)ap`G%popK~ z0|&?1hp(dS6&T_uqlHTU^_P&&%25n$Oo_3*hr;GwwT9y`B7WT&LX5o^ylq?qZ6zGX zd|E&FFoY?y)&7&nPrd92A(vQeJG&q)r}ZP=vlO%BL}j40{0nXCLy@a}r+Uo13Pi+?$Uu(`2E<$WkKHSr{gG&9A zhBOWz(zpVD5P$##AOHafKmY;|f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P>jUs})cC zO7`#0soi*yypYv@llc;%yy#h3cjL6Co~X=}&i$h<!BHw;zo5po^<~$^^G$-(+O9~iBGLPKC~lZt*EOh_UXpKy*tza85cda zrkK<>&R5D+XXR78UccxwZjQI*(RRg#BhhSzs-)E{{yu|b&H4FX52hU9+#YQ@Bb)lX zG`m@oGF=tvMO&U{pXt3f`^Mtp_sh2w$^UTDnx3{uk`;D;vAm--@8-FhS#K!YMQ=@D zby-8Z%DTS39s6a`c~wQFB|nooxTj;~yhqvX1(qw~UZ3vhCqI4848HI%>Mm7xr>yg| z-MhDWv*v0_li@>6QL#OL_OW`eW?N@SUwq!riN|i0oEekz7n_e;&ey7Ct@SYhYn~k* z^&s}Z^7`G+KKfZ_U+xp`T2uFTa7=i$TjCq-}XdpNldgnD)@Y1SETk3ikLOW ze8-C}pWL;*>v>&9^A!5XwyL9&9QAI!;*Rwj@kDX=gWTCU%KS#ruC6Vb{E?e;Z@l?^ hV(*p589gGgcrI-W)^mF2Qv_vW?5u$jTG|lNe*q&UVw?Z~ literal 0 HcmV?d00001 diff --git a/tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-name.subset b/tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-name.subset new file mode 100644 index 0000000000000000000000000000000000000000..635ab80a0414f0fb0d00154c78c137ff46243739 GIT binary patch literal 56188 zcmeIyi&qm@9tUu(tw-ad?NMB-t{te^1vMcd0tr-Y5=0Rt5kwS=8j=B{$xJ#kK^_Mc zTEz8KcR^hh*Pd2TKt)AV@BwWFtDs#BDpX~W0>avE)ryLRv)!FZg3{CO{srF?4w*am z@%!D+@7{<#^-&VFiH;{F3aN~UBw5>u^pgEVBKnR+?I zy&1xLp_wvU4Hijss7_dGv6-_7+ZyoNoqm{!&&SNA5Hexh5|UxfG!;b1q%xUI9XaWUcpi(1gMj#$>nkhl=FmvmBE`csons*oOeABb5()4Ay}3K0>^7T)6#U%* zNXq1zBBZ3z(8)xa+@Fxh{bYnn8AvFVvhClkws`p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>{`nN^Ph+$x~)yBn=|#2yzPr6+P>jUs})cC zO7`#0soi*yypYv@llc;%yy#h3cjL6Co~X=}&i$h<!BHw;zo5po^<~$^^G$-(+O9~iBGLPKC~lZt*EOh_UXpKy*tza85cda zrkK<>&R5D+XXR78UccxwZjQI*(RRg#BhhSzs-)E{{yu|b&H4FX52hU9+#YQ@Bb)lX zG`m@oGF=tvMO&U{pXt3f`^Mtp_sh2w$^UTDnx3{uk`;D;vAm--@8-FhS#K!YMQ=@D zby-8Z%DTS39s6a`c~wQFB|nooxTj;~yhqvX1(qw~UZ3vhCqI4848HI%>Mm7xr>yg| z-MhDWv*v0_li@>6QL#OL_OW`eW?N@SUwq!riN|i0oEekz7n_e;&ey7Ct@SYhYn~k* z^&s}Z^7`G+KKfZ_U+xp`T2uFTa7=i$TjCq-}XdpNldgnD)@Y1SETk3ikLOW ze8-C}pWL;*>v>&9^A!5XwyL9&9QAI!;*Rwj@kDX=gWTCU%KS#ruC6Vb{E?e;Z@l?^ hV(*p589gGgcrI-W)^mF2Qv_vW?5u$jTG|lNe*q&UVw?Z~ literal 0 HcmV?d00001 diff --git a/tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-value.subset b/tests/tx_data/expected_output/ufo-fontinfo-parsing/missing-key-value.subset new file mode 100644 index 0000000000000000000000000000000000000000..3ec1e10a9500d9e6c22b3b2e2babb44331e68e1d GIT binary patch literal 56254 zcmeIyi&qm@9tUu(tw-ad?NMB-uDwvRfA{E;CsR$bLal% z{(kp!e-p8@Cc+~?&%{z5UJ@Azr!0(>)lnXSAwj_m&56VTL26E(#2PrtkGRSuGKrVB zn@B7UVsus$MRQ>krKj`*k6HYPhGldS6h~b76+&nOCj^JkI-^xj4MhF-AQcsFpkIYJ z3Lvga479| z%UcmC7LGE7&~Xg$vZv8o%>${z`TQ1+O(Cwfy|~$*QnPxBHPG?IbzpCfi3qFNY@`H# zM*@o0+aD21QmL3^k|y^i9&%3^Q7U|iLLp0kHE*lIvDHB}gfW~!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5P$##AOHafKmY;|fB*y_009U<00Izz00bZa z0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZaf&U^fxMAtw>#>7x)DLQW zd(x_J3TsY1khmr1*5~c0Sy|h2`bb@QQR2w`bJe5b&YJ`))LSdxIO!QNyR0Fw`ATc; zw%NvppeS+P%8Vrf@$F-A&(EEj`e>GZ&xwk?l{-FZTAA(|an#sbC6~jG7YE&#Ran6O zJT_@hlEs_dM)K~-IRPnmXhv~Ht1FiV(T*7bJ9 z_ha*9!FT2Lz%o%pT`o4Q_!_4Mo<&!(JuiY-cocw9qae33~%;qnGM;ux1<36o2^WxJ2 zOOW^TgB#bgxl_WgS`N;b6gR5-(WF~P3vOKc(vWBxhAnFcPce||fl+C-hc~kI})F#~r!9~Tk{MkqAy_&6^ zp?&drKP4T#S#o+z&Y!G4ZaH5mmbTW%1SCE^H0plr{$=$ME%yUVXZJ)@EOXBe`t(5E zsi@8k5nV3xSMuY`d&`@uM_0{_EpJWf-1ztG$zuYk5tu+>hi_poj2F3!&% z6xOQ$VR^1Gcly@HN>fsj>0!ZV3(9K#LQBqgjCed>UbFhd^pOXnhEy>t8ZS@0y7Ba~ z_K}OyI+yDIc1@M^>Y#CT^{GY0{}LZ6^{9wRJnB1MaOuR(ZC%gmGMcB*hqqQ85#=a% zX=S%9UkfJ+yYJ`D&XMOg3U+pF4$dFBDfjy8-zD{4ew5K85DMqe`VcLvbv#8 + + + + postscriptFontName + bluesarray-string-val + postscriptFDArray + + + PrivateDict + + postscriptBlueValues + invalid-string-for-bluesvaluesarray + postscriptStdHW + + 35 + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/bluesarray-string.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/fontinfo.plist new file mode 100644 index 000000000..6056e7d1f --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/fontinfo.plist @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-dict.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/fontinfo.plist new file mode 100644 index 000000000..efab079c7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/fontinfo.plist @@ -0,0 +1,27 @@ + + + + + postscriptFontName + empty-key-name-in-fdarray + postscriptFDArray + + + + SourceHanSans-Heavy-Generic + PaintType + 3 + PrivateDict + + postscriptBlueValues + + -250 + -250 + 1100 + 1100 + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name-fdarray.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/fontinfo.plist new file mode 100644 index 000000000..cb94b8af0 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/fontinfo.plist @@ -0,0 +1,10 @@ + + + + + + empty-key-value + trademark + Copyright 2014-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. Source is a trademark of Adobe in the United States and/or other countries. + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-name.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/fontinfo.plist new file mode 100644 index 000000000..9ca1ff291 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/fontinfo.plist @@ -0,0 +1,10 @@ + + + + + postscriptFontName + + trademark + Copyright 2014-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. Source is a trademark of Adobe in the United States and/or other countries. + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/empty-key-value.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/fontinfo.plist new file mode 100644 index 000000000..305802955 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/fontinfo.plist @@ -0,0 +1,17 @@ + + + + + postscriptFontName + fontmatrix-string + FontMatrix + invalid-string-for-fontmatrix + trademark + Copyright 2014-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. Source is a trademark of Adobe in the United States and/or other countries. + + + \ No newline at end of file diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/fontmatrix-string.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/fontinfo.plist new file mode 100644 index 000000000..cfff88676 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/fontinfo.plist @@ -0,0 +1,10 @@ + + + + + + empty-key-value + trademark + Copyright 2014-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. Source is a trademark of Adobe in the United States and/or other countries. + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/invalid-key-name.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/fontinfo.plist new file mode 100644 index 000000000..07cbbccc0 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/fontinfo.plist @@ -0,0 +1,7 @@ + + + + + missing-key-name + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name-2.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/fontinfo.plist new file mode 100644 index 000000000..5387b8647 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/fontinfo.plist @@ -0,0 +1,9 @@ + + + + + missing-key-name + postscriptFontName + first-key-missing + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-name.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/fontinfo.plist new file mode 100644 index 000000000..2d0b5ad79 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/fontinfo.plist @@ -0,0 +1,7 @@ + + + + + postscriptFontName + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value-2.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/fontinfo.plist new file mode 100644 index 000000000..a41733c49 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/fontinfo.plist @@ -0,0 +1,9 @@ + + + + + postscriptFontName + trademark + Copyright 2014-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. Source is a trademark of Adobe in the United States and/or other countries. + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/missing-key-value.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/fontinfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/fontinfo.plist new file mode 100644 index 000000000..06b7f9c9e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/fontinfo.plist @@ -0,0 +1,34 @@ + + + + + postscriptFontName + bluesarray-string-val + postscriptFDArray + + + FontName + + -250 + -250 + 1100 + 1100 + + PrivateDict + + postscriptBlueValues + invalid-string-for-bluesvaluesarray + postscriptStdHW + + 35 + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid00000.glif b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid00000.glif new file mode 100644 index 000000000..c80be8f93 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid00000.glif @@ -0,0 +1,40 @@ + + + + + com.adobe.type.cid.CID + 0 + com.adobe.type.cid.iFD + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17899.glif b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17899.glif new file mode 100644 index 000000000..555d8b7dd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17899.glif @@ -0,0 +1,121 @@ + + + + + com.adobe.type.cid.CID + 17899 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17900.glif b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17900.glif new file mode 100644 index 000000000..ef69b7741 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17900.glif @@ -0,0 +1,163 @@ + + + + + com.adobe.type.cid.CID + 17900 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17901.glif b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17901.glif new file mode 100644 index 000000000..f1ea06ec4 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/cid17901.glif @@ -0,0 +1,147 @@ + + + + + com.adobe.type.cid.CID + 17901 + com.adobe.type.cid.iFD + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/contents.plist b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/contents.plist new file mode 100644 index 000000000..e582a5ffd --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/glyphs/contents.plist @@ -0,0 +1,14 @@ + + + + + cid00000 + cid00000.glif + cid17899 + cid17899.glif + cid17900 + cid17900.glif + cid17901 + cid17901.glif + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/lib.plist b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/lib.plist new file mode 100644 index 000000000..c69db61f7 --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + public.glyphOrder + + cid00000 + cid17899 + cid17900 + cid17901 + + com.adobe.type.cid.CIDFontName + Minimal-UFO + com.adobe.type.cid.Registry + Adobe + com.adobe.type.cid.Ordering + Identity + com.adobe.type.cid.Supplement + 0 + + diff --git a/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/metainfo.plist b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/metainfo.plist new file mode 100644 index 000000000..776c3395e --- /dev/null +++ b/tests/tx_data/input/ufo-fontinfo-parsing/switched-string-and-array.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.adobe.type.tx + formatVersion + 2 + + diff --git a/tests/tx_test.py b/tests/tx_test.py index dac112a14..3588a95c8 100644 --- a/tests/tx_test.py +++ b/tests/tx_test.py @@ -1215,3 +1215,40 @@ def test_non_FDArray_dict_parse(): ufo_input_path = get_input_path("nonCIDKeyed_nonFDArrayDict.ufo") arg = [TOOL, '-t1', '-f', ufo_input_path] assert subprocess.call(arg) == 0 + + +@pytest.mark.parametrize('file, msg, ret_code', [ + ("empty-key-name", b'', 0), + ("empty-key-name-fdarray", b'', 0), + ("invalid-key-name", b'', 0), + ("missing-key-name", b'', 0), + ("missing-key-name-2", b'', 0), + ("empty-key-value", b'Warning: Encountered empty for fontinfo ' + + b'key postscriptFontName. Skipping', 0), + ("missing-key-value", b'', 0), + ("missing-key-value-2", b'', 0), + ("bluesarray-string", b'', 0), + ("fontmatrix-string", b'', 0), + ("switched-string-and-array", b'', 0), + ("empty-dict", b'', 0) +]) +def test_ufo_fontinfo_parsing(file, msg, ret_code): + folder = "ufo-fontinfo-parsing/" + ufo_input_path = get_input_path(folder + file + ".ufo") + expected_path = get_expected_path(folder + file + ".subset") + output_path = get_temp_file_path() + arg = CMD + ['-s', '-e', '-a', '-o', 't1', '-f', + ufo_input_path, output_path] + stderr_path = runner(arg) + with open(stderr_path, 'rb') as f: + output = f.read() + assert (msg) in output + if (ret_code == 0): + expected_path = generate_ps_dump(expected_path) + output_path = generate_ps_dump(output_path) + assert differ([expected_path, output_path]) + else: + arg = [TOOL, '-t1', '-f', ufo_input_path] + assert subprocess.call(arg) == 6 + + From 17f9904071bb97240713c56756ca944f2ff332f1 Mon Sep 17 00:00:00 2001 From: Kamile Demir Date: Tue, 14 Jun 2022 14:02:42 -0700 Subject: [PATCH 9/9] =?UTF-8?q?[tx=5Ftest]=20Test=20bug1467=20=E2=80=94=20?= =?UTF-8?q?fontinfo.plist=20parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bug1467_unknown_key_array.txt | 8 + .../fontinfo.plist | 349 ++++++++++++++++++ .../glyphs.background/contents.plist | 5 + .../glyphs.background/layerinfo.plist | 8 + .../glyphs/a.glif | 12 + .../glyphs/contents.plist | 8 + .../glyphs/layerinfo.plist | 8 + .../layercontents.plist | 14 + .../bug1467_unknown_key_array.ufo/lib.plist | 21 ++ .../metainfo.plist | 10 + tests/tx_test.py | 10 + 11 files changed, 453 insertions(+) create mode 100644 tests/tx_data/expected_output/bug1467_unknown_key_array.txt create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/fontinfo.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/contents.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/layerinfo.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/a.glif create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/contents.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/layerinfo.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/layercontents.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/lib.plist create mode 100644 tests/tx_data/input/bug1467_unknown_key_array.ufo/metainfo.plist diff --git a/tests/tx_data/expected_output/bug1467_unknown_key_array.txt b/tests/tx_data/expected_output/bug1467_unknown_key_array.txt new file mode 100644 index 000000000..13ace4693 --- /dev/null +++ b/tests/tx_data/expected_output/bug1467_unknown_key_array.txt @@ -0,0 +1,8 @@ +## Filename NameRecordsTest.ufo +## Top Dict +FamilyName "NameRecordsTest" +sup.srcFontType UFO (name-keyed) +sup.nGlyphs 1 +## FontDict[0] +FontName "NameRecordsTest" +## Private diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/fontinfo.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/fontinfo.plist new file mode 100644 index 000000000..5150dcf0b --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/fontinfo.plist @@ -0,0 +1,349 @@ + + + + + familyName + NameRecordsTest + openTypeNameRecords + + + encodingID + 0 + languageID + 0 + nameID + 0 + platformID + 1 + string + Copyright (c) 2014 by Designer. All rights reserved. + + + encodingID + 1 + languageID + 1033 + nameID + 0 + platformID + 3 + string + Copyright (c) 2014 by Designer. All rights reserved. + + + encodingID + 0 + languageID + 0 + nameID + 1 + platformID + 1 + string + NameRecordsTest + + + encodingID + 1 + languageID + 1033 + nameID + 1 + platformID + 3 + string + NameRecordsTest + + + encodingID + 0 + languageID + 0 + nameID + 2 + platformID + 1 + string + Regular + + + encodingID + 1 + languageID + 1033 + nameID + 2 + platformID + 3 + string + Regular + + + encodingID + 0 + languageID + 0 + nameID + 3 + platformID + 1 + string + Designer: NameRecordsTest: 2014 + + + encodingID + 1 + languageID + 1033 + nameID + 3 + platformID + 3 + string + Designer: NameRecordsTest: 2014 + + + encodingID + 0 + languageID + 0 + nameID + 4 + platformID + 1 + string + NameRecordsTest + + + encodingID + 1 + languageID + 1033 + nameID + 4 + platformID + 3 + string + NameRecordsTest + + + encodingID + 0 + languageID + 0 + nameID + 5 + platformID + 1 + string + Version 1.000 + + + encodingID + 1 + languageID + 1033 + nameID + 5 + platformID + 3 + string + Version 1.000 + + + encodingID + 0 + languageID + 0 + nameID + 6 + platformID + 1 + string + NameRecordsTest + + + encodingID + 1 + languageID + 1033 + nameID + 6 + platformID + 3 + string + NameRecordsTest + + + encodingID + 0 + languageID + 0 + nameID + 7 + platformID + 1 + string + NameRecordsTest is a trademark of Designer. + + + encodingID + 1 + languageID + 1033 + nameID + 7 + platformID + 3 + string + NameRecordsTest is a trademark of Designer. + + + encodingID + 0 + languageID + 0 + nameID + 8 + platformID + 1 + string + Designer + + + encodingID + 1 + languageID + 1033 + nameID + 8 + platformID + 3 + string + Designer + + + encodingID + 0 + languageID + 0 + nameID + 9 + platformID + 1 + string + Designer + + + encodingID + 1 + languageID + 1033 + nameID + 9 + platformID + 3 + string + Designer + + + encodingID + 0 + languageID + 0 + nameID + 10 + platformID + 1 + string + Copyright (c) 2014 by Designer. All rights reserved. + + + encodingID + 1 + languageID + 1033 + nameID + 10 + platformID + 3 + string + Copyright (c) 2014 by Designer. All rights reserved. + + + encodingID + 0 + languageID + 0 + nameID + 11 + platformID + 1 + string + http://www.example.com + + + encodingID + 1 + languageID + 1033 + nameID + 11 + platformID + 3 + string + http://www.example.com + + + encodingID + 0 + languageID + 0 + nameID + 12 + platformID + 1 + string + http://www.example.com + + + encodingID + 1 + languageID + 1033 + nameID + 12 + platformID + 3 + string + http://www.example.com + + + encodingID + 0 + languageID + 0 + nameID + 13 + platformID + 1 + string + license text + + + encodingID + 1 + languageID + 1033 + nameID + 13 + platformID + 3 + string + license text + + + postscriptFontName + NameRecordsTest + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/contents.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/contents.plist new file mode 100644 index 000000000..0c67376eb --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/contents.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/layerinfo.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/layerinfo.plist new file mode 100644 index 000000000..6fef788af --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs.background/layerinfo.plist @@ -0,0 +1,8 @@ + + + + + color + 0,0.6,0.7,0.7 + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/a.glif b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/a.glif new file mode 100644 index 000000000..ffb93db83 --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/a.glif @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/contents.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/contents.plist new file mode 100644 index 000000000..1f9067eda --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/contents.plist @@ -0,0 +1,8 @@ + + + + + a + a.glif + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/layerinfo.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/layerinfo.plist new file mode 100644 index 000000000..cde8a2993 --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/glyphs/layerinfo.plist @@ -0,0 +1,8 @@ + + + + + color + 1,0.75,0,0.7 + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/layercontents.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/layercontents.plist new file mode 100644 index 000000000..8964c5699 --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/layercontents.plist @@ -0,0 +1,14 @@ + + + + + + foreground + glyphs + + + background + glyphs.background + + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/lib.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/lib.plist new file mode 100644 index 000000000..3bde0253d --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/lib.plist @@ -0,0 +1,21 @@ + + + + + com.defcon.sortDescriptor + + + ascending + Adobe Latin 1 + type + characterSet + + + public.glyphOrder + + .notdef + space + a + + + diff --git a/tests/tx_data/input/bug1467_unknown_key_array.ufo/metainfo.plist b/tests/tx_data/input/bug1467_unknown_key_array.ufo/metainfo.plist new file mode 100644 index 000000000..555d9ce4c --- /dev/null +++ b/tests/tx_data/input/bug1467_unknown_key_array.ufo/metainfo.plist @@ -0,0 +1,10 @@ + + + + + creator + com.github.fonttools.ufoLib + formatVersion + 3 + + diff --git a/tests/tx_test.py b/tests/tx_test.py index 3588a95c8..877b70261 100644 --- a/tests/tx_test.py +++ b/tests/tx_test.py @@ -1252,3 +1252,13 @@ def test_ufo_fontinfo_parsing(file, msg, ret_code): assert subprocess.call(arg) == 6 +def test_unknown_key_bug1467(): + """ + Tests a UFO with an unknown key and an value. + The previous implementation of fontinfo.plist parsing would cause a crash + in this scenario. The switch to the libxml2 implementation resolves this. + """ + input_path = get_input_path("bug1467_unknown_key_array.ufo") + expected_path = get_expected_path("bug1467_unknown_key_array.txt") + stdout_path = runner(CMD + ['-s', '-o', 'dump', '0', '-f', input_path]) + assert differ([expected_path, stdout_path, '-l', '1'])