~ubuntu-branches/ubuntu/trusty/fcitx/trusty-proposed

« back to all changes in this revision

Viewing changes to src/ui/cairostuff/font.c

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2013-02-10 17:03:56 UTC
  • mfrom: (1.3.18) (33.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130210170356-2yuv6xy3ed378kn0
Tags: 1:4.2.7-1
* New upstream release.
* New binary packages:
  - fcitx-libs-gclient: D-Bus client library for Glib
  - fcitx-libs-qt: D-Bus client library for Qt
  - fcitx-module-quickphrase-editor: Quick Phrase editor module

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    locale[2] = '\0';
59
59
reloadfont:
60
60
    if (strcmp(*font, "") == 0) {
61
 
        FcChar8 strpat[9];
62
 
        sprintf((char*)strpat, ":lang=%s", locale);
63
 
        pat = FcNameParse(strpat);
 
61
        fcitx_utils_local_cat_str(strpat, strlen(":lang=") + sizeof(locale),
 
62
                                  ":lang=", locale);
 
63
        pat = FcNameParse((FcChar8*)strpat);
64
64
    } else {
65
65
        pat = FcNameParse((FcChar8*)(*font));
66
66
    }