aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsfont.m
diff options
context:
space:
mode:
authorAdrian Robert2008-07-22 12:33:13 +0000
committerAdrian Robert2008-07-22 12:33:13 +0000
commitdf2142db9fc6f38c74366c17e02454e15975652a (patch)
treea9b5b2e50cbd75bdb14168c7d141ae2db1c01581 /src/nsfont.m
parent365bac35a5ff56d76207a5130c7746b085172cee (diff)
downloademacs-df2142db9fc6f38c74366c17e02454e15975652a.tar.gz
emacs-df2142db9fc6f38c74366c17e02454e15975652a.zip
NS cleanup: change 'PENDING' to 'FIXME'/'TODO'/'XXX'
Diffstat (limited to 'src/nsfont.m')
-rw-r--r--src/nsfont.m34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/nsfont.m b/src/nsfont.m
index 132b1aaf29b..f206e0d27b2 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -96,8 +96,8 @@ nsfont_get_family (Lisp_Object font_spec)
96 char *tmp = strdup (SDATA (SYMBOL_NAME (tem))); 96 char *tmp = strdup (SDATA (SYMBOL_NAME (tem)));
97 NSString *family; 97 NSString *family;
98 nsfont_unescape_name (tmp); 98 nsfont_unescape_name (tmp);
99 /* PENDING: this seems to be needed only for font names that are 99 /* TODO: this seems to be needed only for font names that are
100 hard-coded into emacs, like 'helvetica' for splash screen */ 100 hard-coded into emacs, like 'helvetica' for splash screen */
101 if (tmp) 101 if (tmp)
102 tmp[0] = toupper (tmp[0]); 102 tmp[0] = toupper (tmp[0]);
103 family = [NSString stringWithUTF8String: tmp]; 103 family = [NSString stringWithUTF8String: tmp];
@@ -108,7 +108,7 @@ nsfont_get_family (Lisp_Object font_spec)
108 108
109 109
110/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH to NSFont traits. */ 110/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH to NSFont traits. */
111/* PENDING (20080601): The font backend's strategy for handling font 111/* TODO (20080601): The font backend's strategy for handling font
112 styles continues to evolve. When/if this stabilizes, we 112 styles continues to evolve. When/if this stabilizes, we
113 can change the code here to be more sophisticated and accurate. 113 can change the code here to be more sophisticated and accurate.
114 For now, we rely on "normal/plain" style being numeric 100. */ 114 For now, we rely on "normal/plain" style being numeric 100. */
@@ -413,7 +413,7 @@ nsfont_match (Lisp_Object frame, Lisp_Object font_spec)
413 if (fontNames && [fontNames count] > 0) 413 if (fontNames && [fontNames count] > 0)
414 { 414 {
415 NSString *fontName = [fontNames objectAtIndex: 0]; 415 NSString *fontName = [fontNames objectAtIndex: 0];
416 /*PENDING: is there a more efficient way to get family name? */ 416 /* XXX: is there a more efficient way to get family name? */
417 NSFont *font = [NSFont fontWithName: fontName size: 0]; 417 NSFont *font = [NSFont fontWithName: fontName size: 0];
418 if (font != nil) 418 if (font != nil)
419 { 419 {
@@ -453,7 +453,7 @@ nsfont_list_family (Lisp_Object frame)
453 NSString *family; 453 NSString *family;
454 while (family = [families nextObject]) 454 while (family = [families nextObject])
455 list = Fcons (intern ([family UTF8String]), list); 455 list = Fcons (intern ([family UTF8String]), list);
456 /*PENDING: escape the name? */ 456 /* FIXME: escape the name? */
457 457
458 if (NSFONT_TRACE) 458 if (NSFONT_TRACE)
459 fprintf (stderr, "nsfont: list families returning %d entries\n", 459 fprintf (stderr, "nsfont: list families returning %d entries\n",
@@ -519,7 +519,7 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
519 font_info = (struct nsfont_info *) XFONT_OBJECT (font_object); 519 font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
520 font = (struct font *)font_info; 520 font = (struct font *)font_info;
521 if (!font) 521 if (!font)
522 return Qnil; /*PENDING: this copies w32, but causes a segfault */ 522 return Qnil; /* FIXME: this copies w32, but causes a segfault */
523 523
524 if (NSFONT_TRACE) 524 if (NSFONT_TRACE)
525 { 525 {
@@ -627,7 +627,7 @@ BLOCK_INPUT;
627 font->relative_compose = 0; 627 font->relative_compose = 0;
628 font->font_encoder = NULL; 628 font->font_encoder = NULL;
629 629
630 /*PENDING: does anything care about this? */ 630 /* TODO: does anything care about this? */
631 font->props[FONT_FORMAT_INDEX] = Qns; 631 font->props[FONT_FORMAT_INDEX] = Qns;
632 font->props[FONT_FILE_INDEX] = Qnil; 632 font->props[FONT_FILE_INDEX] = Qnil;
633 633
@@ -723,7 +723,7 @@ BLOCK_INPUT;
723 /* set up metrics portion of font struct */ 723 /* set up metrics portion of font struct */
724 font->ascent = [sfont ascender]; 724 font->ascent = [sfont ascender];
725 font->descent = -[sfont descender]; 725 font->descent = -[sfont descender];
726 font->min_width = [sfont widthOfString: @"|"]; /* PENDING */ 726 font->min_width = [sfont widthOfString: @"|"]; /* FIXME */
727 font->space_width = lrint (nsfont_char_width (sfont, ' ')); 727 font->space_width = lrint (nsfont_char_width (sfont, ' '));
728 font->average_width = lrint (font_info->width); 728 font->average_width = lrint (font_info->width);
729 font->max_width = lrint (font_info->max_bounds.width); 729 font->max_width = lrint (font_info->max_bounds.width);
@@ -748,9 +748,9 @@ nsfont_close (FRAME_PTR f, struct font *font)
748 struct nsfont_info *font_info = (struct nsfont_info *)font; 748 struct nsfont_info *font_info = (struct nsfont_info *)font;
749 int i; 749 int i;
750 750
751 /* PENDING: this occurs apparently due to same failure to detect same font 751 /* FIXME: this occurs apparently due to same failure to detect same font
752 that causes need for cache in nsfont_open () 752 that causes need for cache in nsfont_open ()
753 (came after unicode-2 -> trunk) */ 753 (came after unicode-2 -> trunk) */
754 if (!font_info) 754 if (!font_info)
755 return; 755 return;
756 756
@@ -820,8 +820,8 @@ nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
820 for (i =0; i<nglyphs; i++) 820 for (i =0; i<nglyphs; i++)
821 { 821 {
822 /* get metrics for this glyph, filling cache if need be */ 822 /* get metrics for this glyph, filling cache if need be */
823 /* PENDING: get metrics for whole string from an NSLayoutManager 823 /* TODO: get metrics for whole string from an NSLayoutManager
824 (if not too slow) */ 824 (if not too slow) */
825 high = (code[i] & 0xFF00) >> 8; 825 high = (code[i] & 0xFF00) >> 8;
826 low = code[i] & 0x00FF; 826 low = code[i] & 0x00FF;
827 if (!font_info->metrics[high]) 827 if (!font_info->metrics[high])
@@ -903,7 +903,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
903 int cwidth, twidth = 0; 903 int cwidth, twidth = 0;
904 int hi, lo; 904 int hi, lo;
905 char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */ 905 char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */
906 /* PENDING: composition: no vertical displacement is considered. */ 906 /* FIXME: composition: no vertical displacement is considered. */
907 t+= s->gidx; /* advance into composition */ 907 t+= s->gidx; /* advance into composition */
908 for (i =0; i<s->nchars - s->gidx; i++, t++) 908 for (i =0; i<s->nchars - s->gidx; i++, t++)
909 { 909 {
@@ -915,7 +915,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
915 } 915 }
916 else 916 else
917 { 917 {
918 if (!font->metrics[hi]) /*PENDING: why/how can we need this now? */ 918 if (!font->metrics[hi]) /* FIXME: why/how can we need this now? */
919 ns_glyph_metrics (font, hi); 919 ns_glyph_metrics (font, hi);
920 cwidth = font->metrics[hi][lo].width; 920 cwidth = font->metrics[hi][lo].width;
921 } 921 }
@@ -987,7 +987,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
987 col = (NS_FACE_FOREGROUND (face) != nil 987 col = (NS_FACE_FOREGROUND (face) != nil
988 ? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f) 988 ? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f)
989 : FRAME_FOREGROUND_COLOR (s->f)); 989 : FRAME_FOREGROUND_COLOR (s->f));
990 /*PENDING: find another way to pass this */ 990 /* FIXME: find another way to pass this */
991 bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil 991 bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil
992 : (NS_FACE_BACKGROUND (face) != 0 992 : (NS_FACE_BACKGROUND (face) != 0
993 ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) 993 ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
@@ -1320,7 +1320,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
1320 g = unichars[i]; 1320 g = unichars[i];
1321#else 1321#else
1322 g = glyphStorage->cglyphs[i]; 1322 g = glyphStorage->cglyphs[i];
1323 /*PENDING: is this a good check? maybe need to use coveredChars.. */ 1323 /* TODO: is this a good check? maybe need to use coveredChars.. */
1324 if (g > numGlyphs) 1324 if (g > numGlyphs)
1325 g = 0xFFFF; /* hopefully unused... */ 1325 g = 0xFFFF; /* hopefully unused... */
1326#endif 1326#endif