[Webkit-unassigned] [Bug 117788] [freetype] Small-Caps and Italic combination is rendering in normal font instead of italic for small-caps

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 26 12:08:24 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=117788





--- Comment #6 from Tanvir Rizvi <tanvir.abb at gmail.com>  2013-06-26 12:10:18 PST ---
The situation i am speaking about is before the patch is being applied and the font property is italic and font-variant is small caps and there is no italic font file present. I have attached a test script wherein few characters are rendered in italic with caps , and few are rendered with italic and small-caps.


1) We query the fontConfig to get the appropriate font based on font italic property, at this point of time while querying we don't have option of querying for the small caps property. So the font-face we get is a italic font. What i observed is that even if the italic font is not present, the font-face i get is italic without any synthesization.  
2) during the glyph rendering
 a) if the font-variant is small-caps , the path followed is variant path, wherein whatever the scaled font face was created , we will initialize the font face again and get the variant font for the glyph, in this case i should get the small-caps with italic, but i am getting the normal font.

Since small-caps is a font variant property i doubt that FC is giving any precedence to us for these variant properties. 



(In reply to comment #5)
> (In reply to comment #4)
> > In the case when there is no italic version of a font present in the system, the ft-font face will be created as a italic glyph for the character,it also creates the scaled font for that font-face so that next time if we want that font face we can quey the scaled font face.
> >  Now when the Variant font( small -caps ) is queried, the glyph that i get is not italic from the scaled font face.
> > 
> > Now your question  
> > So if we query and get the appropriate font, i.e with italic font, then again the font-face we create from the scaled font-face will not be italic.
> 
> 
> I'm afraid I do not follow what you are trying to say. Can you clarify it? Also, can you specify if you are speaking about the situation before or after your patch is applied.
> 
> For instance, when you say: "In the case when there is no italic version of a font present in the system, the ft-font face will be created as a italic glyph for the character" Are you trying to say that when an italic version of the font is not found, Fontconfig instructs us to emulate it via italic synthesis / slanting?
> 
> I do not understand this at all: "it also creates the scaled font for that font-face so that next time if we want that font face we can quey the scaled font face."
> 
> What I'm suggesting is that we first try to query a font that matches what we are looking for ie italic + small caps. When we receive a font that isn't appropriate. For instance, Fontconfig matches a font that is italic, but not smallcaps, we fall back to looking for one that is just small-caps and use synthesized italics. Another thing to investigate is if Fontconfig gives us APIs to give precedence to certain font features.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list