Skip to content

Commit

Permalink
Add more cluster info and try to make windows build happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mhosken committed Mar 31, 2016
1 parent 2e8e41c commit 8359d98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gr2fonttest/gr2FontTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ int Parameters::testFileFont() const
unsigned short *pText16 = (unsigned short *)malloc((textSrc.getLength() * 2 + 1) * sizeof(unsigned short));
gr2::utf16::iterator ui = pText16;
unsigned int *p = pText32;
for (int i = 0; i < textSrc.getLength(); ++i)
for (unsigned int i = 0; i < textSrc.getLength(); ++i)
{
*ui = *p++;
ui++;
Expand All @@ -678,7 +678,7 @@ int Parameters::testFileFont() const
unsigned char *pText8 = (unsigned char *)malloc((textSrc.getLength() + 1) * 4);
gr2::utf8::iterator ui = pText8;
unsigned int *p = pText32;
for (int i = 0; i < textSrc.getLength(); ++i)
for (unsigned int i = 0; i < textSrc.getLength(); ++i)
{
*ui = *p++;
ui++;
Expand Down
4 changes: 2 additions & 2 deletions tests/examples/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ int main(int argc, char **argv)
char *pError; /* location of faulty utf-8 */
gr_font *font = NULL;
size_t numCodePoints = 0;
unsigned int lenstr = strlen(argv[2]);
gr_segment * seg = NULL;
cluster_t *clusters;
int ic, ci = 0;
Expand All @@ -30,7 +31,6 @@ int main(int argc, char **argv)
if (!face) return 1;
font = gr_make_font(pointsize * dpi / 72.0f, face);
if (!font) return 2;
size_t lenstr = strlen(argv[2]);
numCodePoints = gr_count_unicode_characters(gr_utf8, argv[2], NULL,
(const void **)(&pError));
if (pError || !numCodePoints) return 3;
Expand Down Expand Up @@ -76,7 +76,7 @@ int main(int argc, char **argv)
gr_slot_origin_Y(s));
if (--clusters[ci].num_glyphs == 0) /*<5>*/
{
fprintf(log, "\n");
fprintf(log, "[%d+%d]\n", clusters[ci].base_char, clusters[ci].num_chars);
++ci;
}
}
Expand Down

0 comments on commit 8359d98

Please sign in to comment.