~ubuntu-branches/ubuntu/lucid/m17n-lib/lucid

« back to all changes in this revision

Viewing changes to src/fontset.c

  • Committer: Bazaar Package Importer
  • Author(s): Harshula Jayasuriya
  • Date: 2008-06-23 23:02:47 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080623230247-7o0g4dmlvx1qoe0z
Tags: 1.5.1-1
* New upstream release 1.5.1. (Closes: #434041)
* debian/control: changed to Section: utils.
* debian/{copyright,rules}: updated.
* Updated to debhelper 7.
* Enable patch fix_loadable_modules_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
   You should have received a copy of the GNU Lesser General Public
19
19
   License along with the m17n library; if not, write to the Free
20
 
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
20
   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
21
   02111-1307, USA.  */
22
22
 
23
23
/***en
580
580
      /* Check if this font can display all glyphs.  */
581
581
      for (j = 0; j < *num; j++)
582
582
        {
583
 
          int c = g[j].type == GLYPH_CHAR ? g[j].c : ' ';
 
583
          int c = g[j].type == GLYPH_CHAR ? g[j].g.c : ' ';
 
584
          MFLT *flt;
 
585
          MCharTable *coverage;
 
586
 
584
587
          if (layouter != Mt
585
 
              ? mfont__flt_encode_char (layouter, c) == MCHAR_INVALID_CODE
 
588
              ? ((flt = mflt_get (layouter))
 
589
                 ? (coverage = mflt_coverage (flt),
 
590
                    ! mchartable_lookup (coverage, c))
 
591
                 : 0)
586
592
              : ! mfont__has_char (frame, font, &font_list->object, c))
587
593
            break;
588
594
        }
590
596
        continue;
591
597
      if (j == *num || !all)
592
598
        {
 
599
          MCharTable *coverage = NULL;
 
600
 
593
601
          /* We found a font that can display the requested range of
594
602
             glyphs.  */
595
603
          if (font->type == MFONT_TYPE_REALIZED)
602
610
              font_list->fonts[i].font = (MFont *) rfont;
603
611
            }
604
612
          rfont->layouter = layouter == Mt ? Mnil : layouter;
 
613
          if (rfont->layouter)
 
614
            {
 
615
              MFLT *flt = mflt_get (rfont->layouter);
 
616
 
 
617
              if (flt)
 
618
                coverage = mflt_coverage (flt);
 
619
            }
605
620
          *num = j;
606
621
          for (j = 0; j < *num; j++)
607
622
            {
608
 
              int c = g[j].type == GLYPH_CHAR ? g[j].c : ' ';
 
623
              int c = g[j].type == GLYPH_CHAR ? g[j].g.c : ' ';
609
624
 
610
 
              g[j].code = (rfont->layouter
611
 
                           ? mfont__flt_encode_char (rfont->layouter, c)
612
 
                           : mfont__encode_char (frame, (MFont *) rfont,
613
 
                                                 &font_list->object, c));
 
625
              g[j].g.code = (coverage
 
626
                             ? (unsigned ) mchartable_lookup (coverage, c)
 
627
                             : mfont__encode_char (frame, (MFont *) rfont,
 
628
                                                   &font_list->object, c));
614
629
            }
615
630
          return rfont;
616
631
        }