<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 1 July 2018 at 18:00, Akira TAGOH <span dir="ltr"><<a href="mailto:akira@tagoh.org" target="_blank">akira@tagoh.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br></blockquote><div><br></div><div>Hello Akira, and thanks for your reply.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Exactly speaking, there are three types of matching pattern in<br>
fontconfig though, trying to mention only two here in a question.<br></blockquote><div><br></div><div>The third one is FcMatchScan, I presume? That one is even</div><div>more confusing to me, and the only reason I never mentioned</div><div>it is that I really don't understand that one at all.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">FcFontMatch() will evaluates the best font against this result.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
speaking more details, FcFontRenderprepare() will calls the sort of<br>
FcConfigSubstitite() with FcMatchFont in FcFontMatch(), to evaluate<br>
that pattern against fonts on the system and then returns best font.<br>
So basically you don't need to worry about FcMatchFont unless you<br>
yourself need to emulate something in fontconfig to match on fonts.</blockquote><div><br></div><div>Based on what you just told me, FcFontRenderPrepare is what</div><div>I should be using, and I've just spent a little time playing around</div><div>with it. However, I seem unable to make it return anything useful</div><div>at all. The reason for this is probably that I am using it wrong</div><div>and/or that my expectations are wrong.</div><div><br></div><div>Perhaps it's easier if I explain what my needs are for my McCLIM</div><div>work. I'm hoping that perhaps you or someone else could share</div><div>your expertise and give me some pointers as to which functions I</div><div>should be using to achieve what I need.</div><div><br></div><div>Please don't take my questions as demands. It's probably very</div><div>likely that I simply don't understand what Fontconfig can and</div><div>cannot do.</div><div><br></div><div>What I'm trying to do is the following:</div><div><br></div><div>1:</div><div><br></div><div>Find the "best" font to use for all permutations of the following:</div><div> Typeface: Serif, Sans-serif, Monospace</div><div> Style: Plain, Italic, Bold, Bold-Italic</div><div><br></div><div>In other words, the user may choose "Serif + Italic" or</div><div>"Monospace + Bold" and my code needs return the correct (or</div><div>"best", whatever that means) font for Freetype to load. If such</div><div>font doesn't exist, I can fall back to "Plain" style.</div><div><br></div><div>2:</div><div><br></div><div>Given a specific font (probably from the result of a solution</div><div>to (1)), and a given character, (for example U+1D161 MUSICAL SYMBOL SIXTEENTH NOTE,</div><div>which I have been using in my tests, since I have very few</div><div>fonts that contain this character), provide the "best" font that</div><div>contains this character.</div><div><br></div><div>At this point, I'm not even entirely sure that Fontconfig is able</div><div>to actually do what I need, but if it is, I'd be extremely thankful</div><div>if someone could help me out by giving specific pointers as to</div><div>how to do it.</div><div><br></div><div>Regards,</div><div>Elias</div><div><br></div></div></div></div>