Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18663

make tcpdf fonts to be downloadable as optional components



    • Bug
    • Resolution: Won't Do
    • Minor
    • None
    • 1.9.4, 2.0
    • Libraries
    • None
    • Moderate


      (23:19:35) David Mudrák: What I do not like is the lib size. plain lib/tcpdf now has 15MB 8-o, 14MB of which is occupied by fonts. I am wondering if we could reduce the size by stripping the fonts and shipp the lib with just DejaVu base set
      (23:19:48) Eloy: fonts must be downloadeable
      (23:20:46) David Mudrák: yes
      (23:21:22) Eloy: easy to achieve and good for everybody IMO.
      (23:21:34) David Mudrák: so what about leaving just some basic in the core (DejaVu seems to be prefered one) and put the rest into contrib
      (23:22:06) Eloy: I hope nobody is using them, correct?
      (23:22:24) David Mudrák: well, actually, nobody is using whole tcpdf
      (23:22:25) Eloy: and people coming from 1.9... ?
      (23:22:53) David Mudrák: only Certificate and Course ordering and invoicing, AFAIK
      (23:22:55) Eloy: cert module, for example?
      (23:23:12) Eloy: and can they specify other fonts?
      (23:23:41) Eloy: I mean, is it safe to erase them from 2.0 ? no dependencies?
      (23:26:51) David Mudrák: do not know actually
      (23:27:01) David Mudrák: question is - does 14MB matter?
      (23:27:33) David Mudrák: I mean - more Moodle-specific changes === more problems with upgrades
      (23:29:19) David Mudrák: hmm, 14MB is 10% of the whole Moodle source code size... pretty enough for the library that is not used by any core plugin :-~
      (23:34:48) dan.marsden: David - just got back
      (23:34:57) dan.marsden: yeah I think removing some of those fonts would be good
      (23:35:15) dan.marsden: would be nice if we could store them in a way that allowed easy download like the lang packs
      (23:35:51) Eloy: just tell me where they are stored and I'll create the necessary infrastructure in download.moodle.org to handle them.
      (23:36:22) David Mudrák: right now they are in lib/tcpdf/fonts/
      (23:36:43) David Mudrák: but without a deeper strucutre
      (23:37:08) David Mudrák: I do not know yet how to prepare them into separate packages
      (23:38:03) ***David Mudrák will look into tcpdf src to check out how fonts are handled and how can be modularized
      (23:38:12) dan.marsden: I remember vaguely looking at this and thinking it should be possible
      (23:38:30) David Mudrák: everything thinkable is possible
      (23:38:35) dan.marsden: heh
      (23:38:40) Eloy: well, it's not important if all them end in the same directory. But obviously they'll need to be grouped in contrib
      (23:38:59) David Mudrák: Eloy: right
      (23:39:15) Eloy: contrib->fonts->helvetica (containing bold, italic...)
      contrib->fonts->apple_garamond (containing bold, italic...)
      (23:39:34) dan.marsden: I've been testing a newer version of tcpdf and found it to be much better on filesize
      (23:39:37) Eloy: obviously branched since the beginning
      (23:39:55) dan.marsden: not testing the version released today though.
      (23:40:38) David Mudrák: Eloy: +1 but needs checking how tightly thay are connected with TCPDF
      (23:40:51) Eloy: yup, yup, of course
      (23:41:00) David Mudrák: contrib>fonts>tcpdf>*
      (23:41:19) Eloy: np (that's the idea)
      (23:41:20) dan.marsden: tcpdf/tcpdf_config.php contains the path for fonts
      (23:41:25) mattc [mattc@moodle.org/Home] vstoupil do místnosti.
      (23:41:30) dan.marsden: so theoretically we could just change that path
      (23:41:47) Eloy: dataroot/fonts
      (23:42:03) dan.marsden: might need to be dataroot/tcpdffonts
      (23:42:04) David Mudrák: dan: we alreay support different path int the wrapper lib/pdflib.php
      (23:42:07) Eloy: hehe, yes
      (23:42:55) Eloy: dataroot/fonts/tcpdf (folowing david's proposal above)
      (23:43:07) dan.marsden: cool.
      (23:43:09) Eloy: in case we want to introduce goshtscript fonts later
      (23:43:13) Eloy: :-P
      (23:43:34) Eloy: or latex fonts... or... who knows.


        Issue Links



              Unassigned Unassigned
              mudrd8mz David Mudrák (@mudrd8mz)
              9 Vote for this issue
              11 Start watching this issue




                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.