I am trying to display phonetic symbols in a WebView
, but so far I am only getting squares.
For instance, for the word "apostrophe", this should be displayed:
əˈpåstrəfi
but all I am getting on the display is:
□□påstr□fi
If it would help, I am getting the strings from an SQLite database. The string I retrieve has some HTML tags in it, so I use this:
webView.loadDataWithBaseURL("file:///android_asset/",
article, "text/html", Encoding.UTF_8.toString(), null);
where I have my CSS files in /assets
. And the article
variable contains some text enclosed in HTML tags.
Gboard now supports IPA!
Add Indic Phonetic keyboards: Add the keyboard by clicking the + icon and then select the type of keyboard. Lastly, enable the phonetic keyboard by clicking on the input indicator on the taskbar (or press the Windows key + Space) and select the Indic Phonetic keyboard.
I've resolved problem to display phonetic symbols in TextView. The problem is the default android fonts are not implement IPA symbols. I can advise to use ccs like this
@font-face {
/* Regular */
font-family: "ConstructiumRegular";
src: url("http://openfontlibrary.org/content/RebeccaRGB/412/Constructium.ttf") format("truetype");
font-weight: 400;
font-style: normal;
font-variant: normal;
font-stretch: normal;
}
In me case mentioned Constructium.ttf fits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With