mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 20:10:37 +00:00
Add better support for font descriptor. Requires a recompile of the backend.
This should be enough for Emacs to compile with GNUstep. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28525 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9f6848cace
commit
56d4f7938d
7 changed files with 281 additions and 64 deletions
|
@ -527,6 +527,7 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
{
|
||||
NSArray *a;
|
||||
float fontMatrix[6];
|
||||
NSAffineTransformStruct ats;
|
||||
|
||||
descriptor = [descriptor matchingFontDescriptorWithMandatoryKeys:
|
||||
[NSSet setWithArray: [[descriptor fontAttributes] allKeys]]];
|
||||
|
@ -539,8 +540,13 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
if ((a == nil) || ([a count] == 0))
|
||||
return nil;
|
||||
|
||||
// FIXME: This method is deprecated
|
||||
[transform getMatrix: fontMatrix];
|
||||
ats = [transform transformStruct];
|
||||
fontMatrix[0] = ats.m11;
|
||||
fontMatrix[1] = ats.m12;
|
||||
fontMatrix[2] = ats.m21;
|
||||
fontMatrix[3] = ats.m22;
|
||||
fontMatrix[4] = ats.tX;
|
||||
fontMatrix[5] = ats.tY;
|
||||
|
||||
return [self fontWithName: [a objectAtIndex: 0]
|
||||
matrix: fontMatrix];
|
||||
|
@ -1140,8 +1146,7 @@ static BOOL flip_hack;
|
|||
|
||||
- (NSFontDescriptor*) fontDescriptor
|
||||
{
|
||||
// FIXME
|
||||
return nil;
|
||||
return [fontInfo fontDescriptor];
|
||||
}
|
||||
|
||||
/* The following methods have to be implemented by backends */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue