Code covered by the BSD License  

Highlights from
EPS Utility Toolbox

EPS Utility Toolbox

by

 

02 Mar 2012 (Updated )

A set of functions to generate publisher-happy EPS images

extractfont(imgdata,detail)
function FInfo = extractfont(imgdata,detail)
%EXTRACTFONT Retrieve all embedded fonts from EPS data
%   Expects imgdata has been treated by epsfixfonts
%   Returns FInfo struct array

% Copyright 2012 Takeshi Ikuma
% History:
% rev. - : (03-11-2012) original release

% Find all embedded font data
fontdata = regexp(imgdata,'%%BeginResource: font (.+?)\s+(.*?)%%EndResource\s+?','tokens');

Nfonts = numel(fontdata);
for n = Nfonts:-1:1
   FInfo(n) = type1info(pfadecrypt(fontdata{n}{2}),detail,false);
end

Contact us