| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Oversight in my fallback fix, this resulted in things being wrongly
destroyed due to unrefs. Oops.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The fallback failed when a "small caps" font was requested. This commit
improves the fallback support. When the first fallback, trying Sans with
the same style fails, we reset the variant, weight and stretch to
default values and try again. With Sans we should always be able to
adhere to the requested style.
Last but not least, output a sensible error message if all fallbacks
fail instead of simply crashing on a NULL pointer somewhere.
|
|
|
|
|
| |
Same fallback as already used in CoreText font descriptor to Pango
font descriptor conversion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch written in collaboration with Michael Natterer.
Some CTFontDescriptors apparently do not have a style name or font
family name set. This patch makes the code take such corner cases into
account. The font family problem only appears to occur on Snow Leopard
systems, we try to fall back on the font name (postscript name), if that
fails, we fall back on a default fallback.
In some cases a coverage is also not set. (This seems to happen when we
cannot map a broken font back to a correct font descriptor). In such
cases we simply return an empty PangoCoverage, which will likely cause
the engine to fallback on a different font.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We implement font fallbacks by making use of
CTFontCopyDefaultCascadeList, a public, non-exposed, symbol in the
CoreText library. We might want to handle this differently.
The code now also uses a PangoCoreTextFontsetKey and
PangoCoreTextFontKey, similar to the font config backend. This has also
helped to clean up the code in general.
This patch contains two fixes by Michael Natterer:
1. Fix a bug in pango_core_text_font_key_equal() where the return value
of memcmp() was wrongly interpreted.
2. Cache PangoCoverage in PangoCoreTextFont.
|
|
|
|
|
|
|
|
|
|
| |
It turns out that getting this value as "Int" is incorrect and resulted
in font traits not being returned in some cases. Without traits, an
italic trait is not set, which caused synthetic oblique fonts to be
created when not necessary.
Also use CTFontSymbolicTraits type in the PangoCoreTextFace structure
and do a stricter bit mask check for certainty.
|
|
|
|
| |
Fix CoreText backend to not use the casefold string as family name.
|
|
|
|
|
| |
the conversion from the CFNumber with a mapping table in pango_core_test_face_from_ct_font_descriptor()
This assigns PangoWeights which better align with the CoreText weights and better ensures that unique values are used for hash keys used for determining which faces need synthetic italic faces created.
|
|
|
|
| |
and PangoCoreTextFaceClass so that it actually compiles.
|
| |
|
| |
|
|
|
|
|
|
| |
Deduce from the given style name whether a font is oblique. If a font
family does not have an italic or oblique variant, then add synthetic
italic variants that are handled by Pango.
|
| |
|
|
On Mac OS X systems where CoreText is available (that is, 10.5 or
higher), we will build the CoreText backend instead of the ATSUI
backend. In this case, the ATSUI backend will not be built and
installed. This change is necessary because since Mac OS 10.5
ATSUI has been marked as deprecated.
For older systems, we will have to continue to use the
ATSUI backend.
|