<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - does not render ligatures for TeX Gyre Hermes font anymore"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80093#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - does not render ligatures for TeX Gyre Hermes font anymore"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80093">bug 80093</a>
from <span class="vcard"><a class="email" href="mailto:fabian+debian@greffrath.com" title="Fabian Greffrath <fabian+debian@greffrath.com>"> <span class="fn">Fabian Greffrath</span></a>
</span></b>
<pre>This code does both directions.
const size_t namelen = strlen(name);
if (!strchr(name, '_'))
{
// try with interleaved underscores
int i;
char *tempname = malloc ((2 * namelen + 1) * sizeof (*tempname));
tempname[0] = name[0];
for (i = 1; i < namelen; i++)
{
tempname[2*i] = name[i];
tempname[2*i-1] = '_';
}
}
else
{
// try without interleaved underscores
int i, j;
char *tempname = malloc ((namelen + 1) * sizeof (*tempname));
for (i = j = 0; i < namelen; i++)
{
if (name[i] != '_')
tempname[j++] = name[i];
}
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>