Skip to main content
Participating Frequently
July 27, 2025
Question

I would like to know the default CTM in Postscript

  • July 27, 2025
  • 1 reply
  • 113 views

I am now trying to convert an old open source Metafont font into modern OTF format, and one intermediate step I used was Metapost that converted each glyph into its individual postscript file. One particular glyph started with:

0 0 0 setrgbcolor 0 50.47063 dtransform truncate idtransform setlinewidth pop

which means that a default CTM must have been referred to, but I am not sure what is the value here.

Another thing is that "concat" is applied immediately prior to "stroke", and I am not sure if I should interpret it as: coordinates for paths are in one space, while that for pen is in another.

    1 reply

    Ten A
    Community Expert
    Community Expert
    August 8, 2025

    Basically, the Current Transformation Matrix is a parameter for devices that the PostScript device side has. It is applied in the printer or other device to align the given data with the internal coordinate system, which is the device space, and multiplied with the coordinate system of the PostScript file.
    Therefore, there is no need to consider them when manipulating PostScript files. The concat command is processed in device space by multiplying a given affine matrix by CTM, but we who view the file in user space do not need to consider CTM.