[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0446a5a 04/13: Use NSCharacterCollection instead of
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master 0446a5a 04/13: Use NSCharacterCollection instead of CTCharacterCollection |
Date: |
Sun, 21 May 2017 15:51:46 -0400 (EDT) |
branch: master
commit 0446a5a040f7a0142b33cb70946fcde54914b2ce
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>
Use NSCharacterCollection instead of CTCharacterCollection
This should not cause behavior changes, but fixes a compiler warning
due to implicit conversions between the enums.
* src/macfont.m (macfont_cache, macfont_lookup_cache)
(macfont_get_glyph_for_cid, macfont_get_uvs_table)
(macfont_variation_glyphs): Use NSCharacterCollection.
---
src/macfont.m | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/macfont.m b/src/macfont.m
index f356842..b859eb4 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -206,7 +206,7 @@ mac_screen_font_get_advance_width_for_glyph (ScreenFontRef
font, CGGlyph glyph)
#if !USE_CT_GLYPH_INFO
static CGGlyph
-mac_font_get_glyph_for_cid (CTFontRef font, CTCharacterCollection collection,
+mac_font_get_glyph_for_cid (CTFontRef font, NSCharacterCollection collection,
CGFontIndex cid)
{
CGGlyph result = kCGFontIndexInvalid;
@@ -1321,8 +1321,8 @@ struct macfont_cache
/* Character collection specifying the destination of the mapping
provided by `table' above. If `table' is obtained from the UVS
subtable in the font cmap table, then the value of this member
- should be kCTCharacterCollectionIdentityMapping. */
- CTCharacterCollection collection;
+ should be NSIdentityMappingCharacterCollection. */
+ NSCharacterCollection collection;
} uvs;
};
@@ -1333,8 +1333,8 @@ static CFCharacterSetRef macfont_get_cf_charset (struct
font *);
static CFCharacterSetRef macfont_get_cf_charset_for_name (CFStringRef);
static CGGlyph macfont_get_glyph_for_character (struct font *, UTF32Char);
static CGGlyph macfont_get_glyph_for_cid (struct font *font,
- CTCharacterCollection, CGFontIndex);
-static CFDataRef macfont_get_uvs_table (struct font *, CTCharacterCollection
*);
+ NSCharacterCollection, CGFontIndex);
+static CFDataRef macfont_get_uvs_table (struct font *, NSCharacterCollection
*);
static struct macfont_cache *
macfont_lookup_cache (CFStringRef key)
@@ -1582,7 +1582,7 @@ macfont_get_glyph_for_character (struct font *font,
UTF32Char c)
}
static CGGlyph
-macfont_get_glyph_for_cid (struct font *font, CTCharacterCollection collection,
+macfont_get_glyph_for_cid (struct font *font, NSCharacterCollection collection,
CGFontIndex cid)
{
struct macfont_info *macfont_info = (struct macfont_info *) font;
@@ -1593,7 +1593,7 @@ macfont_get_glyph_for_cid (struct font *font,
CTCharacterCollection collection,
}
static CFDataRef
-macfont_get_uvs_table (struct font *font, CTCharacterCollection *collection)
+macfont_get_uvs_table (struct font *font, NSCharacterCollection *collection)
{
struct macfont_info *macfont_info = (struct macfont_info *) font;
CTFontRef macfont = macfont_info->macfont;
@@ -1603,12 +1603,12 @@ macfont_get_uvs_table (struct font *font,
CTCharacterCollection *collection)
if (cache->uvs.table == NULL)
{
CFDataRef uvs_table = mac_font_copy_uvs_table (macfont);
- CTCharacterCollection uvs_collection =
- kCTCharacterCollectionIdentityMapping;
+ NSCharacterCollection uvs_collection =
+ NSIdentityMappingCharacterCollection;
if (uvs_table == NULL
&& mac_font_get_glyph_for_cid (macfont,
- kCTCharacterCollectionAdobeJapan1,
+ NSAdobeJapan1CharacterCollection,
6480) != kCGFontIndexInvalid)
{
/* If the glyph for U+4E55 is accessible via its CID 6480,
@@ -1625,7 +1625,7 @@ macfont_get_uvs_table (struct font *font,
CTCharacterCollection *collection)
if (mac_uvs_table_adobe_japan1)
{
uvs_table = CFRetain (mac_uvs_table_adobe_japan1);
- uvs_collection = kCTCharacterCollectionAdobeJapan1;
+ uvs_collection = NSAdobeJapan1CharacterCollection;
}
}
if (uvs_table == NULL)
@@ -3348,7 +3348,7 @@ static int
macfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
{
CFDataRef uvs_table;
- CTCharacterCollection uvs_collection;
+ NSCharacterCollection uvs_collection;
int i, n = 0;
block_input ();
@@ -3368,7 +3368,7 @@ macfont_variation_glyphs (struct font *font, int c,
unsigned variations[256])
{
CGGlyph glyph = glyphs[i];
- if (uvs_collection != kCTCharacterCollectionIdentityMapping
+ if (uvs_collection != NSIdentityMappingCharacterCollection
&& glyph != kCGFontIndexInvalid)
glyph = macfont_get_glyph_for_cid (font, uvs_collection, glyph);
if (glyph == kCGFontIndexInvalid)
- [Emacs-diffs] master updated (0821292 -> 6f1f882), Philipp Stephani, 2017/05/21
- [Emacs-diffs] master cf68bb4 02/13: Declare Nextstep unexec functions in lisp.h, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master cc6db8b 05/13: Make a function static that isn't used outside this file, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 0446a5a 04/13: Use NSCharacterCollection instead of CTCharacterCollection,
Philipp Stephani <=
- [Emacs-diffs] master 6f1f882 13/13: Avoid uninitialized read, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master f04e3d6 07/13: Remove trailing semicolons in method definitions, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 2d8215a 10/13: Remove unused automatic variables, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 74d4304 09/13: Nextstep: Replace deprecated enumerators, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 762be77 08/13: Nextstep: remove some deprecated method calls, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 6dd94bc 11/13: Clean up code around 'ns-list-services', Philipp Stephani, 2017/05/21
- [Emacs-diffs] master d79a4ea 03/13: Remove unused function print_regions, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master add0b69 06/13: Remove calls to deprecated setUsesScreenFonts, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master 84b28ec 01/13: Nextstep: Use instancetype explicit return type, Philipp Stephani, 2017/05/21
- [Emacs-diffs] master fa389f5 12/13: Fix call of registerServicesMenuSendTypes, Philipp Stephani, 2017/05/21