Adrian, I'm not sure: Are you angry at me now? I hope not, and if you are: my apologies. I sure don't intend to get in your way and I'm fully aware that you're doing something in the vicinity. I certainly don't mind sorting out any conflicts on my side. Since SVN write access doesn't work anyway at the moment I won't commit anything immediately. I also have to do a bit more testing tomorrow. I'm simply going down my task list and this topic happened to come out on top. I just thought I'd share what I came up with. After all this is nothing big and it's very easy for me to go a different route if necessary. My main work was in areas where you won't have to change anything.
But WDYT about my proposal? Useful? Stupid? On 29.04.2008 19:02:13 Adrian Cumiskey wrote: > Jeremias, > > I think we may have some crossed wires here as I communicated that I'd be > working in this area and > have been working on a matching mechanism following your suggested > font-substitution-catalog > configuration. > > I very much hope I don't feel the need to throw anything away as my > implementation includes weight > and style, and also takes account of priority. If you have something working > I guess you should go > ahead and commit when svn has returned, and I'll spend some time sorting out > the conflicts :). > > Adrian. > > Jeremias Maerki wrote: > > I'm working on making referenced fonts work with font auto-detection, > > i.e. that one can define which fonts should not be embedded, only > > referenced. I already have the basics working locally. In the case of > > TrueType fonts I can make use of the same mechanism I introduced for > > Type 1 fonts to address more than just the WinAnsi glyphs (using > > multiple single byte encodings). I'm writing because I want to see if > > anyone is opposed to my approach for specifying which fonts should be > > referenced. Here's what the config file now looks like: > > > > <fonts> > > [..] > > <referenced-fonts> > > <match font-family="Helvetica"/> > > <match font-family="DejaVu.*"/> > > <match font-family=".*Grotesk.*"/> > > </referenced-fonts> > > </fonts> > > > > Basically I've defined an interface for which I can add whatever > > implementation I want: > > > > public class FontTriplet implements Comparable, Serializable { > > > > [..] > > > > /** > > * Matcher interface for [EMAIL PROTECTED] FontTriplet}. > > */ > > public interface Matcher { > > > > /** > > * Indicates whether the given [EMAIL PROTECTED] FontTriplet} > > matches a particular criterium. > > * @param triplet the font triplet > > * @return true if the font triplet is a match > > */ > > boolean matches(FontTriplet triplet); > > } > > } > > > > I'm currently using regular expressions to match the font-family names. > > If the font matches it is set to referencing mode. Works pretty nicely > > IMO. > > > > BTW, Adrian, you could use the same interface for the matching part I've > > proposed earlier for the font substitution. > > > > Jeremias Maerki > > > > Jeremias Maerki