Commit graph

36 commits

Author SHA1 Message Date
fredkiefer
de86246567 * Source/cairo/CairoFontInfo.m: Revert to the old defaults for
hinting and allow for all possible values to be set.
2019-12-24 14:10:02 +01:00
fredkiefer
36283735ab * Source/cairo/CairoFontInfo.m,
* Source/fontconfig/FCFontEnumerator.m: Small cleanup of last pull
request.
2019-05-19 22:56:48 +02:00
Jeff Teunissen
f87842d08a Turn on hinting and subpixel rendering for Cairo.
There's no good reason not to enable subpixel rendering and hinting.
Leaving it off makes GNUstep apps look worse than everything else, in
exchange for having -advancementForGlyph: be totally consistent, which
may not even be necessary.

So, yeah, let's just turn this stuff on. I reused the subpixel default
from back-art to preserve configs, and added a GSFontHinting default to
control text hinting.

Use 0 for whatever Cairo defaults to, 1 for off, 2 for slight hinting,
3 for medium hinting, or 4 for full hinting.
2019-03-26 03:58:18 -04:00
Jeff Teunissen
8f19df1949 Support named glyphs, encodings in Cairo
Implement a method for accessing named glyphs and character codings from
Cairo.

This is a necessary first step for complex glyph substitution, and even
simple things like standard ligatures.
2019-03-26 03:58:18 -04:00
Jeff Teunissen
016f5eda25 Cairo: Reduce the hilarity of the font panel
Use many more weights and widths when generating the (still extremely
stupid) synthetic PostScript font names.
2019-03-26 03:58:18 -04:00
Fred Kiefer
4c06213c78 * Source/cairo/CairoGState.m (-GSSetFont:),
* Source/cairo/CairoFaceInfo.m (-drawGlyphs:...): Use scaled
  font directly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37523 72102866-910b-0410-8b05-ffd578937521
2013-12-29 22:43:15 +00:00
Ivan Vučica
61cf75b2fc In preparation for reusing this code in the Opal backend, moved fontconfig code to a dedicated set of classes that are now superclasses of Cairo backend's font classes.
Fixed a bug in CairoGState: a NSDebugMLLog() had this obvious mistake in its format (as was printed out by the compiler): @"%self"



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37066 72102866-910b-0410-8b05-ffd578937521
2013-09-10 21:07:03 +00:00
Fred Kiefer
035502afd9 * Source/cairo/CairoFntInfo.m (-drawGlyphs:..., -setupAttributes):
Invert the value of matrix[2]. See bug #30493


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@35927 72102866-910b-0410-8b05-ffd578937521
2012-12-31 17:38:42 +00:00
Eric Wasylishen
088912afe1 * Source/cairo/CairoFontInfo.m (-setupAttributes):
use CAIRO_HINT_METRICS_ON instead of CAIRO_HINT_METRICS_OFF,
otherwise some text is cut of (e.g. quit Ink with unsaved
changes, the "t" in "Quit" in the dialog is cut off)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34613 72102866-910b-0410-8b05-ffd578937521
2012-01-23 22:53:57 +00:00
Eric Wasylishen
9d52d255cb * Source/cairo/CairoFontInfo.m (-setupAttributes):
We must not leave the hinting settings as their defaults,
because if we did, that would mean using the surface defaults
which might or might not use hinting (xlib does by default.)

Since we make measurements outside of the context of a surface
(-advancementForGlyph:), we need to ensure that the same
hinting settings are used there as when we draw. For now,
just force hinting to be off.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34612 72102866-910b-0410-8b05-ffd578937521
2012-01-23 22:40:29 +00:00
Eric Wasylishen
dc80ca3aa0 back: implement coveredCharacterSet for CairoFontInfo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32716 72102866-910b-0410-8b05-ffd578937521
2011-03-28 04:19:41 +00:00
Eric Wasylishen
282a590ad5 core/back: replace objc_{malloc/free} with malloc/free
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31629 72102866-910b-0410-8b05-ffd578937521
2010-11-18 20:28:15 +00:00
Fred Kiefer
92fdccd8d3 Adjust to the CGFloat change for NSFont
and NSAffineTransform done in base and gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29689 72102866-910b-0410-8b05-ffd578937521
2010-02-20 16:33:30 +00:00
Fred Kiefer
9781c27f45 Small improvements for cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26711 72102866-910b-0410-8b05-ffd578937521
2008-06-25 22:20:18 +00:00
Adam Fedor
250ebdfad0 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26620 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:12:46 +00:00
Fred Kiefer
9e70cc09f7 Moved ligature handling code from art to gui. Small improvements for
other font classes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26431 72102866-910b-0410-8b05-ffd578937521
2008-04-04 22:07:03 +00:00
Fred Kiefer
9ca5ecc181 Correct cairo glyph to path conversion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26426 72102866-910b-0410-8b05-ffd578937521
2008-04-02 22:10:32 +00:00
Fred Kiefer
19dda8e5a7 Clean up and better error check and reporting on cairo and malloc calls.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26391 72102866-910b-0410-8b05-ffd578937521
2008-03-29 13:16:58 +00:00
Isaiah Beerbower
5dd462faa9 Reverting back to former font system.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25721 72102866-910b-0410-8b05-ffd578937521
2007-12-11 12:06:42 +00:00
Isaiah Beerbower
2d50c93089 Rewrite font system to cache fonts in a plist and support nfont bundles.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25717 72102866-910b-0410-8b05-ffd578937521
2007-12-11 00:14:01 +00:00
Fred Kiefer
0f8c5487c7 Change files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25538 72102866-910b-0410-8b05-ffd578937521
2007-10-29 23:25:10 +00:00
Fred Kiefer
901c5b758c First implementation of appendBezierPathWithGlyphs:count:toBezierPath:
for cairo.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25522 72102866-910b-0410-8b05-ffd578937521
2007-10-08 21:27:51 +00:00
Sergii Stoian
5cb04d880e * Source/cairo/CairoGState.m: (-DPSshow:): Apply correct scale
and translate transformation matrix.
* Source/cairo/CairoFontInfo.m: (-widthOfString:): Add sanity check.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25298 72102866-910b-0410-8b05-ffd578937521
2007-07-01 22:17:14 +00:00
Fred Kiefer
b2d624ad91 Don't use cairo transformations, use the super class implementation
instead. 


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24896 72102866-910b-0410-8b05-ffd578937521
2007-03-18 17:50:58 +00:00
Fred Kiefer
78ba818f54 Clean up of font attributes and better protection against _ct being null
in cairo backend.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24710 72102866-910b-0410-8b05-ffd578937521
2007-02-27 16:35:31 +00:00
Richard Frith-MacDonald
b11db22054 Minor tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@24444 72102866-910b-0410-8b05-ffd578937521
2007-01-31 15:52:53 +00:00
Fred Kiefer
6d504f2218 General cleanup of cairo backend code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@22644 72102866-910b-0410-8b05-ffd578937521
2006-03-12 21:50:17 +00:00
GNUstep Maintainer
8289d73137 Replicating the svn commit from the old repository:
r22389 | fredkiefer | 2006-01-29 15:51:31 -0600 (Sun, 29 Jan 2006) | 2 lines

Different default fonts and better UTF8 conversion for cairo backend.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@22393 72102866-910b-0410-8b05-ffd578937521
2006-01-30 18:25:11 +00:00
Fred Kiefer
33ac1163e4 Made the cairo backend compile with the current cairo CVS version.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@22350 72102866-910b-0410-8b05-ffd578937521
2006-01-23 20:51:40 +00:00
Fred Kiefer
5de50d17fd Small cairo fixes plus NET WM icon setting.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21964 72102866-910b-0410-8b05-ffd578937521
2005-11-07 00:11:09 +00:00
Fred Kiefer
7a1693eaf2 Get cairo surfaces working for resized windows.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21685 72102866-910b-0410-8b05-ffd578937521
2005-08-28 00:48:12 +00:00
Fred Kiefer
cfd4cdcdf1 Adopted to Cairo changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21663 72102866-910b-0410-8b05-ffd578937521
2005-08-19 23:42:55 +00:00
Fred Kiefer
b16cb0fe3c Changed to compile with latest cairo interface changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21561 72102866-910b-0410-8b05-ffd578937521
2005-07-27 23:25:32 +00:00
Adam Fedor
7a3f75f9ac Update FSF Address
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@21263 72102866-910b-0410-8b05-ffd578937521
2005-05-26 22:51:53 +00:00
Fred Kiefer
63366359cf Small imporvements for Cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20037 72102866-910b-0410-8b05-ffd578937521
2004-09-08 22:08:15 +00:00
Fred Kiefer
1d40f7d8cc Added cairo backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@19820 72102866-910b-0410-8b05-ffd578937521
2004-08-02 21:50:17 +00:00