Forum archive 2000-2006

Lars Jensen - Webwork2: Huge fonts with dvipng

Lars Jensen - Webwork2: Huge fonts with dvipng

by Arnold Pizer -
Number of replies: 0
inactiveTopicWebwork2: Huge fonts with dvipng topic started 6/27/2004; 7:15:45 PM
last post 7/28/2004; 3:35:25 PM
userLars Jensen - Webwork2: Huge fonts with dvipng  blueArrow
6/27/2004; 7:15:45 PM (reads: 2056, responses: 7)
After a recent webwork2 cvs update the screen fonts from dvipng (images mode) have suddenly gotten very large. The fonts from jsMath look normal. How do I change the size of the fonts in images mode? I don't see any options to do so in the global.conf file...

Thanks, Lars.

<| Post or View Comments |>


userJohn Jones - Re: Webwork2: Huge fonts with dvipng  blueArrow
6/27/2004; 10:15:23 PM (reads: 2382, responses: 0)
This sounds like a mismatch between your version of dvipng, and the arguments being passed to it. There was a big change as of dvipng 1.0. The arguments now reside in lib/WeBWorK/Constants.pm. There are sample arguments for either version of dvipng.

Be sure to remove your old images after you get it fixed. With the provided script remove_stale_images, you would use (as superuser)

remove_stale_images --remove --days=0

to delete them all

John

<| Post or View Comments |>


userMichael Gage - Re: Webwork2: Huge fonts with dvipng  blueArrow
6/27/2004; 10:15:36 PM (reads: 2364, responses: 0)
Hi Lars,

Change the settings in lib/WeBWorK/Constants.pm for ImageGenerator::DvipngArgs

You need to use the settings corresponding to the version of dvipng that you are using. I _think_, judging from your description, that you are using dvipng version less than 1.0 and have settings for the Dvipng version 1.0 or greater.

You should also check pg/lib/WeBWorK/PG/ImageGenerator.pm and make sure that you have the latest version of that file. (update pg from the CVS)

We plan to use Constants.pm for some parameters that are seldom changed, and for which it is useful to load them when the apache child is created, reserving global.conf for those paramters which are more often changed at individual sites, or overridden on a course by course basis. The course.conf and global.conf parameters are consulted with every http request.

At the moment, with some having the latest dvipng, and some not, there will need to be some customization in Constants.pm.

-- Mike

<| Post or View Comments |>


userJan-Åke Larsson - Re: Webwork2: Huge fonts with dvipng  blueArrow
6/28/2004; 4:19:40 AM (reads: 2345, responses: 0)
Actually, it is the other way around. You are using dvipng version greater than 1.0 and have settings for dvipng version 0.x.

The reason for the change is that it used to be very awkward to select resolution, by choosing base resolution, metafont mode, magstep, and shrinkfactor. All you need to do now is choose output resolution.

For those of you who use teTeX, dvipng-1.1 (or later) will be included in teTeX-3.

<| Post or View Comments |>


userLars Jensen - Re: Webwork2: Huge fonts with dvipng  blueArrow
7/3/2004; 10:39:56 AM (reads: 2367, responses: 0)
Thank you all for helping with this. Now dvipng works great with webwork 2. I needed to switch to the configuration for dvipng versions > 1 so now my configuration is:

$WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgTransparent -D120 -q -depth";

I have webwork2 and webwork1 running on the same machine, so they use the same dvipng.

Considering this, what should the dvipng section look like in Global.pm for my webwork1 installation?

<| Post or View Comments |>


userThomas Hagedorn - Re: Webwork2: Huge fonts with dvipng  blueArrow
7/23/2004; 11:32:02 PM (reads: 2327, responses: 0)
Lars,

Did you ever figure out what the dvipng section should look like in Global.pm for your Webwork 1.* installation? We just upgraded to Webwork2 and dvipng 1.0 and now our Webwork 1.* problems have very large sizes.

Thanks, Tom

<| Post or View Comments |>


userLars Jensen - Re: Webwork2: Huge fonts with dvipng  blueArrow
7/25/2004; 6:37:23 AM (reads: 2345, responses: 0)
No, but I played around with the settings and ended up with:

$dvipngMode = "toshiba";

$dvipngDPI = 180;

$dvipngScaling = 0.6; # reasonable for toshiba

$dvipngShrinkFactor = 6; # reasonable for toshiba

Lars.

<| Post or View Comments |>


userArnold K. Pizer - Re: Webwork2: Huge fonts with dvipng  blueArrow
7/28/2004; 3:35:25 PM (reads: 2344, responses: 0)
Here is what we are using for the latest version of WeBWorK1 (1.9.05) which is just about to be released.

 

# Arguments for versions of dvipng less than version 1.0
#$DvipngArgs = '-x4000.5 -bgTransparent -Q6 -mode toshiba -D180 ' ;
# Arguments for versions of dvipng greater than or equal to version 1.0
$DvipngArgs = '-bg Transparent -D120 ';

Arnie

<| Post or View Comments |>