Para o Debian 7 (Wheezy):
Você pode baixar os arquivos fonte do Debian e fazer as alterações você mesmo, depois recompilar e instalar os pacotes .deb criados:
Abra um terminal raiz:
apt-get install dpkg-dev;
apt-get build-dep libpango1.0-0;
exit;
Abra um terminal comum:
cd; mkdir patch-libpango; cd patch-libpango;
apt-get source libpango1.0-0;
Agora vá para a sua pasta pessoal e abra o arquivo patch-libpango/pango1.0-1.30.0/pango/break.c
e encontre este bloco de código:
/* ---- Word breaks ---- */
/* default to not a word start/end */
attrs[i].is_word_start = FALSE;
attrs[i].is_word_end = FALSE;
if (current_word_type != WordNone)
{
/* Check for a word end */
switch ((int) type)
{
case G_UNICODE_SPACING_MARK:
case G_UNICODE_ENCLOSING_MARK:
case G_UNICODE_NON_SPACING_MARK:
case G_UNICODE_FORMAT:
/* nothing, we just eat these up as part of the word */
break;
case G_UNICODE_LOWERCASE_LETTER:
case G_UNICODE_MODIFIER_LETTER:
case G_UNICODE_OTHER_LETTER:
case G_UNICODE_TITLECASE_LETTER:
case G_UNICODE_UPPERCASE_LETTER:
if (current_word_type == WordLetters)
{
/* Japanese special cases for ending the word */
if (JAPANESE (last_word_letter) ||
JAPANESE (wc))
{
if ((HIRAGANA (last_word_letter) &&
!HIRAGANA (wc)) ||
(KATAKANA (last_word_letter) &&
!(KATAKANA (wc) || HIRAGANA (wc))) ||
(KANJI (last_word_letter) &&
!(HIRAGANA (wc) || KANJI (wc))) ||
(JAPANESE (last_word_letter) &&
!JAPANESE (wc)) ||
(!JAPANESE (last_word_letter) &&
JAPANESE (wc)))
attrs[i].is_word_end = TRUE;
}
}
else
{
/* end the number word, start the letter word */
attrs[i].is_word_end = TRUE;
attrs[i].is_word_start = TRUE;
current_word_type = WordLetters;
}
last_word_letter = wc;
break;
case G_UNICODE_DECIMAL_NUMBER:
case G_UNICODE_LETTER_NUMBER:
case G_UNICODE_OTHER_NUMBER:
if (current_word_type != WordNumbers)
{
attrs[i].is_word_end = TRUE;
attrs[i].is_word_start = TRUE;
current_word_type = WordNumbers;
}
last_word_letter = wc;
break;
default:
/* Punctuation, control/format chars, etc. all end a word. */
attrs[i].is_word_end = TRUE;
current_word_type = WordNone;
break;
}
}
else
{
/* Check for a word start */
switch ((int) type)
{
case G_UNICODE_LOWERCASE_LETTER:
case G_UNICODE_MODIFIER_LETTER:
case G_UNICODE_OTHER_LETTER:
case G_UNICODE_TITLECASE_LETTER:
case G_UNICODE_UPPERCASE_LETTER:
current_word_type = WordLetters;
last_word_letter = wc;
attrs[i].is_word_start = TRUE;
break;
case G_UNICODE_DECIMAL_NUMBER:
case G_UNICODE_LETTER_NUMBER:
case G_UNICODE_OTHER_NUMBER:
current_word_type = WordNumbers;
last_word_letter = wc;
attrs[i].is_word_start = TRUE;
break;
default:
/* No word here */
break;
}
}
e substitua-o por:
/* ---- Word breaks ---- */
/* default to not a word start/end */
attrs[i].is_word_start = FALSE;
attrs[i].is_word_end = FALSE;
if (current_word_type != WordNone)
{
/* Check for a word end */
switch ((int) type)
{
case G_UNICODE_SPACING_MARK:
case G_UNICODE_ENCLOSING_MARK:
case G_UNICODE_NON_SPACING_MARK:
case G_UNICODE_FORMAT:
/* nothing, we just eat these up as part of the word */
break;
case G_UNICODE_LOWERCASE_LETTER:
case G_UNICODE_MODIFIER_LETTER:
case G_UNICODE_OTHER_LETTER:
case G_UNICODE_TITLECASE_LETTER:
case G_UNICODE_UPPERCASE_LETTER:
if (current_word_type == WordLetters)
{
/* Japanese special cases for ending the word */
if (JAPANESE (last_word_letter) ||
JAPANESE (wc))
{
if ((HIRAGANA (last_word_letter) &&
!HIRAGANA (wc)) ||
(KATAKANA (last_word_letter) &&
!(KATAKANA (wc) || HIRAGANA (wc))) ||
(KANJI (last_word_letter) &&
!(HIRAGANA (wc) || KANJI (wc))) ||
(JAPANESE (last_word_letter) &&
!JAPANESE (wc)) ||
(!JAPANESE (last_word_letter) &&
JAPANESE (wc)))
attrs[i].is_word_end = TRUE;
}
}
last_word_letter = wc;
break;
case G_UNICODE_DECIMAL_NUMBER:
case G_UNICODE_LETTER_NUMBER:
case G_UNICODE_OTHER_NUMBER:
last_word_letter = wc;
break;
default:
if (wc == 0x005F) break; //underscore
/* Punctuation, control/format chars, etc. all end a word. */
attrs[i].is_word_end = TRUE;
current_word_type = WordNone;
break;
}
}
else
{
/* Check for a word start */
switch ((int) type)
{
case G_UNICODE_LOWERCASE_LETTER:
case G_UNICODE_MODIFIER_LETTER:
case G_UNICODE_OTHER_LETTER:
case G_UNICODE_TITLECASE_LETTER:
case G_UNICODE_UPPERCASE_LETTER:
current_word_type = WordLetters;
last_word_letter = wc;
attrs[i].is_word_start = TRUE;
break;
case G_UNICODE_DECIMAL_NUMBER:
case G_UNICODE_LETTER_NUMBER:
case G_UNICODE_OTHER_NUMBER:
current_word_type = WordNumbers;
last_word_letter = wc;
attrs[i].is_word_start = TRUE;
break;
default:
/* No word here */
break;
}
}
Volte para o seu terminal normal:
cd ~/patch-libpango/pango*;
dpkg-buildpackage -rfakeroot -uc -b;
Agora vá para sua pasta pessoal e abra a pasta patch-libpango
, você deve encontrar alguns arquivos .deb
lá.
Instale todos eles, exceto os pacotes debug e doc (aqueles que possuem -dbg e -doc em seu nome de arquivo)
Você agora pode excluir o diretório patch-libpango
, voltar ao seu terminal normal:
cd; rm -rf patch-libpango;
Feito, você não precisa reiniciar o sistema.
Nota: isso também tratará o sublinhado como parte de uma palavra (encontre 0x005F no código editado).
Referências: