[evince/wip/gpoo/backends-dvi-t1-removal] backend: Remove support for T1 fonts on dvi




commit 094031501ee6a7b4bb155d35d0bdcaa7c3383421
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Wed Mar 2 00:20:23 2022 -0300

    backend: Remove support for T1 fonts on dvi
    
    Evince uses t1lib to render T1 Postscript fonts. However, the library
    has been unavailable from distributions like Debian since about 2014.
    By then, it had unattended security issues, and no development for
    about three years.
    
    The issue was discussed in Debian, see the issue:
    "t1lib: history of security issues, unmaintained upstream, unsupportable"
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637488
    
    In Evince, t1lib was used to rasterize, not to draw glyphs. Still,
    it is very likely that the code was never built and/or used since
    t1lib stopped being available in distributions.
    
    Time to remove it from Evince codebase.

 backend/dvi/fonts.c              |   6 -
 backend/dvi/mdvi-lib/meson.build |   1 -
 backend/dvi/mdvi-lib/t1.c        | 630 ---------------------------------------
 backend/dvi/meson.build          |   1 -
 meson.build                      |   4 -
 5 files changed, 642 deletions(-)
---
diff --git a/backend/dvi/fonts.c b/backend/dvi/fonts.c
index 99be63cea..883464033 100644
--- a/backend/dvi/fonts.c
+++ b/backend/dvi/fonts.c
@@ -12,9 +12,6 @@ extern DviFontInfo ovf_font_info;
 #if 0
 extern DviFontInfo tt_font_info;
 #endif
-#ifdef WITH_TYPE1_FONTS
-extern DviFontInfo t1_font_info;
-#endif
 extern DviFontInfo afm_font_info;
 extern DviFontInfo tfm_font_info;
 extern DviFontInfo ofm_font_info;
@@ -28,9 +25,6 @@ static struct fontinfo {
        {&ovf_font_info, "Omega's virtual fonts", 0},
 #if 0
        {&tt_font_info, "TrueType fonts", 0},
-#endif
-#ifdef WITH_TYPE1_FONTS
-       {&t1_font_info, "Type1 PostScript fonts", 0},
 #endif
        {&pk_font_info, "Packed bitmap (auto-generated)", 1},
        {&pkn_font_info, "Packed bitmap", -2},
diff --git a/backend/dvi/mdvi-lib/meson.build b/backend/dvi/mdvi-lib/meson.build
index 69e03705c..f119879d5 100644
--- a/backend/dvi/mdvi-lib/meson.build
+++ b/backend/dvi/mdvi-lib/meson.build
@@ -17,7 +17,6 @@ sources = files(
   'setup.c',
   'special.c',
   'sp-epsf.c',
-  't1.c',
   'tfm.c',
   'tfmfile.c',
   'tt.c',
diff --git a/backend/dvi/meson.build b/backend/dvi/meson.build
index 3809b6271..33f57fab7 100644
--- a/backend/dvi/meson.build
+++ b/backend/dvi/meson.build
@@ -11,7 +11,6 @@ deps = backends_deps + [
   libmdvi_dep,
   libspectre_dep,
   kpathsea_dep,
-  t1_dep,
   m_dep
 ]
 
diff --git a/meson.build b/meson.build
index 87d710a77..bd7591ba8 100644
--- a/meson.build
+++ b/meson.build
@@ -392,10 +392,6 @@ if enable_dvi
     config_h.set('SIZEOF_' + type[1], cc.sizeof(type[0]))
   endforeach
 
-  t1_dep = cc.find_library('t1', required: get_option('t1lib'))
-  enable_t1lib = t1_dep.found() and cc.has_function('T1_InitLib', dependencies: t1_dep)
-  config_h.set('WITH_TYPE1_FONTS', enable_t1lib)
-
   backends += {'dvi': mime_types_list.get('dvi')}
   evince_mime_types += mime_types_list.get('dvi')
 elif get_option('dvi').auto()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]