alexballas / go2tv

Cast media files to UPnP/DLNA Media Renderers and Smart TVs.
MIT License
514 stars 52 forks source link

The Chinese display is not normal in the interface. #52

Closed duolabmeng6 closed 2 years ago

duolabmeng6 commented 2 years ago

image

alexballas commented 2 years ago

Hello! Thank you for raising this.

Go2TV GUI is based on the Fyne (https://github.com/fyne-io/fyne) toolkit. Fyne only bundles the NotoSans font which does not include Chinese or other Asian characters).

Can you please try specifying the path to a Chinese TTF file in the FYNE_FONT environment variable? This should correct the display of the characters.

Another approach could be to inject a Chinese font into the Go2TV app with code but that would only partially fix the issue since then we should also include other fonts like Bengali and Japanese etc… and they are huge.

Thanks, Alex

duolabmeng6 commented 2 years ago
image

Thank you very much.

duolabmeng6 commented 2 years ago

https://github.com/flopp/go-findfont

func init() {
    fontPaths := findfont.List()
    for _, path := range fontPaths {
        fmt.Println(path)
        //楷体:simkai.ttf
        //黑体:simhei.ttf
        if strings.Contains(path, "simkai.ttf") {
            os.Setenv("FYNE_FONT", path)
            break
        }
    }
    fmt.Println("=============")
}

Find a piece of code that can help you.

I tested your program. There's no problem with the screen.

However, for volume control, there is no way to restore sound on Huawei's smart screen.

alexballas commented 2 years ago

However, for volume control, there is no way to restore sound on Huawei's smart screen.

Could you please some more details on this? What's not working?

duolabmeng6 commented 2 years ago

However, for volume control, there is no way to restore sound on Huawei's smart screen.

Could you please some more details on this? What's not working?

Product model: 华为智慧屏 s65 https://www.vmall.com/product/10086874753382.html

problem

image

The video is displayed normally. It is normal to add or subtract the volume when it is not muted.

I think it's the TV set of Huawei. The volume cannot be restored after muting

If you don't mute, it's normal to increase or decrease the volume.

But being able to cast the screen normally, I already think it is enough for daily use.

alexballas commented 2 years ago

But if you click it again and the sound is unmuted, the volume controls start working again? Correct?

duolabmeng6 commented 2 years ago

But if you click it again and the sound is unmuted, the volume controls start working again? Correct?

I mean, after muting, the software can't restore the sound. You have to use the remote control.

duolabmeng6 commented 2 years ago
image

Can't return data under window. I think it's your gui..

So I made a magic change.

duolabmeng6 commented 2 years ago

https://github.com/duolabmeng6/easy_to_tv

Because your gui is so hard to use.. I specially wrote a new one for myself to use.

About the problem that data cannot be returned under window What I did was to delete all the code for gui and terminal interaction.

https://github.com/duolabmeng6/easy_to_tv/blob/main/go2tv_res/cmd/go2tv-lite/go2tv.go

Thank you for the code. Thank you very much. Although my writing is not perfect, it really works.

alexballas commented 2 years ago

So after muting, umuting does not work. That's really strange since both Mute and Unmute work on the same way. As for the GUI, that's fine. I understand not many people like it. This is why I have the go2tv-lite. Happy that you were able to repurpose it for your own needs

duolabmeng6 commented 2 years ago

It's okay. It could be Huawei's problem. As long as it can be broadcast on TV.