Git Product home page Git Product logo

Comments (13)

ben-clayton avatar ben-clayton commented on May 3, 2024

argh. So I added some code to look for fonts in the directories specified by FontPaths, I'm guessing Arial.ttf isn't in any of those places? Maybe it is, but has the wrong case?
I'm guessing your system has an arial font somewhere, do you know where it might be found?

from gxui.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

Evidently I have no Arial.ttf.

Run as root:
$ find / -iname arial.ttf
No results

I'm running Xubuntu 14.04.

I do have a bunch of fonts in /usr/share/fonts/truetype/.

 $ pwd
/usr/share/fonts/truetype

 $ find . -iname '*.ttf'
./kacst-one/KacstOne-Bold.ttf
./kacst-one/KacstOne.ttf
./liberation/LiberationSerif-Bold.ttf
./liberation/LiberationMono-BoldItalic.ttf
./liberation/LiberationSerif-BoldItalic.ttf
./liberation/LiberationSans-Italic.ttf
./liberation/LiberationSansNarrow-Regular.ttf
./liberation/LiberationSans-Regular.ttf
./liberation/LiberationSansNarrow-Italic.ttf
./liberation/LiberationMono-Regular.ttf
./liberation/LiberationSansNarrow-BoldItalic.ttf
./liberation/LiberationSansNarrow-Bold.ttf
./liberation/LiberationSans-BoldItalic.ttf
./liberation/LiberationMono-Bold.ttf
./liberation/LiberationSerif-Italic.ttf
./liberation/LiberationMono-Italic.ttf
./liberation/LiberationSans-Bold.ttf
./liberation/LiberationSerif-Regular.ttf
./ttf-punjabi-fonts/lohit_pa.ttf
./ttf-punjabi-fonts/Saab.ttf
./fonts-japanese-gothic.ttf
./lyx/msbm10.ttf
./lyx/cmr10.ttf
./lyx/eufm10.ttf
./lyx/cmsy10.ttf
./lyx/msam10.ttf
./lyx/rsfs10.ttf
./lyx/esint10.ttf
./lyx/cmex10.ttf
./lyx/cmmi10.ttf
./lyx/wasy10.ttf
./freefont/FreeSerifBoldItalic.ttf
./freefont/FreeSerifBold.ttf
./freefont/FreeSansOblique.ttf
./freefont/FreeMono.ttf
./freefont/FreeSans.ttf
./freefont/FreeSansBoldOblique.ttf
./freefont/FreeSansBold.ttf
./freefont/FreeSerif.ttf
./freefont/FreeMonoBoldOblique.ttf
./freefont/FreeMonoOblique.ttf
./freefont/FreeMonoBold.ttf
./freefont/FreeSerifItalic.ttf
./takao-gothic/TakaoPGothic.ttf
./kacst/KacstDigital.ttf
./kacst/KacstLetter.ttf
./kacst/KacstScreen.ttf
./kacst/KacstPoster.ttf
./kacst/KacstArt.ttf
./kacst/KacstQurn.ttf
./kacst/KacstNaskh.ttf
./kacst/KacstDecorative.ttf
./kacst/KacstTitleL.ttf
./kacst/KacstTitle.ttf
./kacst/KacstPen.ttf
./kacst/mry_KacstQurn.ttf
./kacst/KacstBook.ttf
./kacst/KacstFarsi.ttf
./kacst/KacstOffice.ttf
./lao/Phetsarath_OT.ttf
./tibetan-machine/TibetanMachineUni.ttf
./sinhala/lklug.ttf
./abyssinica/AbyssinicaSIL-R.ttf
./tlwg/Norasi-BoldItalic.ttf
./tlwg/Garuda.ttf
./tlwg/TlwgMono.ttf
./tlwg/TlwgTypewriter-Bold.ttf
./tlwg/Garuda-Bold.ttf
./tlwg/TlwgTypist-Oblique.ttf
./tlwg/TlwgTypist.ttf
./tlwg/Umpush-LightOblique.ttf
./tlwg/Waree-Bold.ttf
./tlwg/Kinnari-Bold.ttf
./tlwg/Norasi.ttf
./tlwg/Kinnari.ttf
./tlwg/Umpush-Bold.ttf
./tlwg/Kinnari-BoldOblique.ttf
./tlwg/Kinnari-Italic.ttf
./tlwg/TlwgTypo-Bold.ttf
./tlwg/TlwgMono-Oblique.ttf
./tlwg/TlwgTypewriter-BoldOblique.ttf
./tlwg/Norasi-BoldOblique.ttf
./tlwg/Norasi-Bold.ttf
./tlwg/TlwgTypist-BoldOblique.ttf
./tlwg/TlwgTypist-Bold.ttf
./tlwg/Umpush-Light.ttf
./tlwg/Garuda-BoldOblique.ttf
./tlwg/Norasi-Italic.ttf
./tlwg/Purisa.ttf
./tlwg/Sawasdee-Bold.ttf
./tlwg/TlwgTypo-BoldOblique.ttf
./tlwg/Purisa-Bold.ttf
./tlwg/Kinnari-Oblique.ttf
./tlwg/Umpush-BoldOblique.ttf
./tlwg/Loma-Oblique.ttf
./tlwg/TlwgTypewriter-Oblique.ttf
./tlwg/Kinnari-BoldItalic.ttf
./tlwg/Purisa-Oblique.ttf
./tlwg/Garuda-Oblique.ttf
./tlwg/TlwgTypo.ttf
./tlwg/Umpush-Oblique.ttf
./tlwg/TlwgMono-Bold.ttf
./tlwg/Purisa-BoldOblique.ttf
./tlwg/Waree-Oblique.ttf
./tlwg/Sawasdee-Oblique.ttf
./tlwg/Norasi-Oblique.ttf
./tlwg/Loma.ttf
./tlwg/TlwgTypewriter.ttf
./tlwg/TlwgMono-BoldOblique.ttf
./tlwg/Umpush.ttf
./tlwg/TlwgTypo-Oblique.ttf
./tlwg/Loma-BoldOblique.ttf
./tlwg/Sawasdee.ttf
./tlwg/Loma-Bold.ttf
./tlwg/Waree-BoldOblique.ttf
./tlwg/Waree.ttf
./tlwg/Sawasdee-BoldOblique.ttf
./ttf-khmeros-core/KhmerOSsys.ttf
./ttf-khmeros-core/KhmerOS.ttf
./padauk/Padauk.ttf
./padauk/Padauk-bold.ttf
./padauk/Padauk-book.ttf
./padauk/Padauk-bookbold.ttf
./nanum/NanumGothicBold.ttf
./nanum/NanumGothic.ttf
./nanum/NanumMyeongjoBold.ttf
./nanum/NanumMyeongjo.ttf
./nanum/NanumBarunGothic.ttf
./nanum/NanumBarunGothicBold.ttf
./droid/DroidSerif-BoldItalic.ttf
./droid/DroidSerif-Bold.ttf
./droid/DroidSerif-Italic.ttf
./droid/DroidSans.ttf
./droid/DroidNaskh-Bold.ttf
./droid/DroidSansEthiopic-Regular.ttf
./droid/DroidSansArmenian.ttf
./droid/DroidSansFallbackFull.ttf
./droid/DroidSans-Bold.ttf
./droid/DroidSansHebrew-Bold.ttf
./droid/DroidSansMono.ttf
./droid/DroidSansGeorgian.ttf
./droid/DroidNaskh-Regular.ttf
./droid/DroidSansEthiopic-Bold.ttf
./droid/DroidSansJapanese.ttf
./droid/DroidSerif-Regular.ttf
./droid/DroidSansThai.ttf
./droid/DroidSansHebrew-Regular.ttf
./openoffice/opens___.ttf
./dejavu/DejaVuSerif.ttf
./dejavu/DejaVuSans.ttf
./dejavu/DejaVuSansMono-Bold.ttf
./dejavu/DejaVuSans-Bold.ttf
./dejavu/DejaVuSerif-Bold.ttf
./dejavu/DejaVuSansMono.ttf
./ubuntu-font-family/UbuntuMono-R.ttf
./ubuntu-font-family/UbuntuMono-B.ttf
./ubuntu-font-family/Ubuntu-RI.ttf
./ubuntu-font-family/Ubuntu-LI.ttf
./ubuntu-font-family/Ubuntu-MI.ttf
./ubuntu-font-family/Ubuntu-C.ttf
./ubuntu-font-family/Ubuntu-R.ttf
./ubuntu-font-family/UbuntuMono-BI.ttf
./ubuntu-font-family/Ubuntu-M.ttf
./ubuntu-font-family/Ubuntu-L.ttf
./ubuntu-font-family/Ubuntu-BI.ttf
./ubuntu-font-family/Ubuntu-B.ttf
./ubuntu-font-family/UbuntuMono-RI.ttf
./ttf-indic-fonts-core/lohit_gu.ttf
./ttf-indic-fonts-core/lohit_hi.ttf
./ttf-indic-fonts-core/lohit_ta.ttf
./ttf-indic-fonts-core/Vemana.ttf
./ttf-indic-fonts-core/lohit_bn.ttf
./ttf-indic-fonts-core/Malige-n.ttf
./ttf-indic-fonts-core/utkal.ttf
./ttf-indic-fonts-core/gargi.ttf
./ttf-indic-fonts-core/Rekha.ttf
./ttf-indic-fonts-core/Kedage-b.ttf
./ttf-indic-fonts-core/Kedage-n.ttf
./ttf-indic-fonts-core/Malige-b.ttf
./ttf-indic-fonts-core/Rachana_04.ttf
./ttf-indic-fonts-core/MuktiNarrow.ttf
./ttf-indic-fonts-core/Pothana2000.ttf
./ttf-indic-fonts-core/MuktiNarrowBold.ttf
./ttf-indic-fonts-core/Meera_04.ttf

from gxui.

StefanSchroeder avatar StefanSchroeder commented on May 3, 2024

You should consider installing the ttf-mscorefonts package.

from gxui.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

@StefanSchroeder: I'd rather not if I can avoid it, because it requires accepting a Microsoft EULA. I'll leave it up to @ben-clayton -- if you want me to leave my machine in its current state to test a potential fix, I'll leave it alone. If you want me to install the Microsoft package so no further work is needed, I'll do that to save the effort, since it's not my effort.

from gxui.

ben-clayton avatar ben-clayton commented on May 3, 2024

I'm not sure what the best option is in this case.
Obviously any text rendering requires a font. With e441085, the driver scans the known OS font directories, but if we're trying to support a set of operating systems that have no common fonts, then this approach just isn't going to work.
The only real option would be to include a font with the GXUI library - which is doable, but has its own problems:

  • We'd have to find a font that looks good and doesn't have any licensing issues.
  • GXUI will have to be told the directory of this font. This is effectively what the --data command line argument does, but I was hoping to try and remove this as it is additional complexity to getting something on the screen.

I can start investigating what our options are with a bundled font. In the meantime, to run the samples you should be able to take any font you like, rename it to Arial.ttf and set --data to the directory that it sits in. For applications you develop yourself, you are always free to call Theme.SetDefaultFont before any text controls are created.

from gxui.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

Thanks for that info, @ben-clayton. I'm sure I can make it work by installing the font, using the workaround you suggested, or forking and adding a font I have as an option. Feel free to close this issue if you think it's a narrow part of the bigger --data issue you're dealing with separately.

from gxui.

ryanseys avatar ryanseys commented on May 3, 2024

I am attempting to run on Mac 10.10.2 and getting the same error. I definitely have Arial on my machine.

from gxui.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

@ryanseys Please report the full path to Arial.ttf. Did you check the things @ben-clayton suggested above in this thread? I happened to have a Mac lying around so I checked, and my Arial.ttf is in /Library/Fonts/Arial.ttf, which isn't in the FontPaths slice mentioned above. I'm sure you can make it work by adding that /Library path to FontPaths.

from gxui.

ryanseys avatar ryanseys commented on May 3, 2024

I copied Arial.ttf into /Library/Fonts and that worked. However changing the FontPaths list to include /Library/Fonts/Microsoft/ (where Arial.ttf resides) didn't work. I'm not sure why that is the case.

from gxui.

ben-clayton avatar ben-clayton commented on May 3, 2024

I'll keep this issue open as a 'we need bundle a font' issue. It's good to keep the context why.

from gxui.

ben-clayton avatar ben-clayton commented on May 3, 2024

This should now be fixed as we bundle a font. Please let us know if you have more issues.

from gxui.

ShawnMilo avatar ShawnMilo commented on May 3, 2024

Confirmed: The progress_bar sample runs on my Xbuntu 14.04 machine, without the MS font package. Thanks!

from gxui.

ben-clayton avatar ben-clayton commented on May 3, 2024

That's great news - thank you for confirming!

from gxui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.