Giter Club home page Giter Club logo

Comments (9)

andydotxyz avatar andydotxyz commented on May 3, 2024 4

Can you please try specifying the path to a Japanese TTF file in the FYNE_FONT environment variable?
This should correct the display of the characters, but I am not certain if it requires additional work for input support.
We will be able to make a better user experience by adding some fyne_config app in the future where fonts could be selected visually or language chosen etc...

Added in change 7d2d312

from fyne.

andydotxyz avatar andydotxyz commented on May 3, 2024

Apologies we have not completed the unicode support. There is a work in progress (PR #56) which you could perhaps test if you are interested.
Otherwise we will revisit this issue once that new code is landed.

from fyne.

hajimehoshi avatar hajimehoshi commented on May 3, 2024

Tried to execute hello but failed:

hajimehoshi@Hajimes-MacBook-Pro ~/fyne/cmd/hello 
$ go run .
# fyne.io/fyne/driver/gl
../../driver/gl/gl_darwinfix.go:10:5: warning: 'NSOpenGLContext' is deprecated: first deprecated in macOS 10.14 - Please use Metal or MetalKit. [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:202:12: note: 'NSOpenGLContext' has been explicitly marked deprecated here
# fyne.io/fyne/driver/gl
../../driver/gl/gl.go:158:17: undefined: oksvg.ReadIconStream

EDIT: I added go.mod to test this outside GOPATH.

from fyne.

hajimehoshi avatar hajimehoshi commented on May 3, 2024

OK this was my mistake: oksvg in my go.mod was old.

from fyne.

hajimehoshi avatar hajimehoshi commented on May 3, 2024

Screenshot from Gyazo

I think rendering is not perfect, but it worked. Thank you!

from fyne.

goodxp avatar goodxp commented on May 3, 2024

I run the demo on Mac, tried to alter the welcome title by simply adding 2 Chinese characters, looks like it does not support internationalization yet. I wish it could be added in the future.

Screenshot 2019-10-11 at 8 25 28 PM

Screenshot 2019-10-11 at 8 25 50 PM

from fyne.

andydotxyz avatar andydotxyz commented on May 3, 2024

Can you please try the suggestion higher in this ticket? #63 (comment)
Unicode is supported, but we don’t bundle font files for all languages yet.

from fyne.

goodxp avatar goodxp commented on May 3, 2024

The higher is still the same. I think it will partially work with Japanese since there are 2 kinds of characters in Japanese, one is like English(a character set with about twice the number in ASCII) and #63 might have fixed it with #63, another kind is like traditional Asian characters like Chinese with a large character set, each character with 2+ bytes presentation in Unicode , which did not be fixed. This may cause a larger code change - probably need to alter all font drawing related "string" type to []rune and iterate with rune instead of byte. It is just my guess. Really hope to see this fixed soon.

from fyne.

andydotxyz avatar andydotxyz commented on May 3, 2024

Can you please provide a code example of what does not work? We have had reports that Chinese is working fine after loading the right font so I assumed multibyte was working. We have attempted to use []rune under the hood so if we’ve missed somewhere this should get fixed

from fyne.

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.