community icon indicating copy to clipboard operation
community copied to clipboard

Backticks in strings are incorrectly handled in Kivy 2.1.0

Open sanderland opened this issue 2 years ago • 3 comments

This does not happen in the default font, but does in e.g. NotoSans. I initially thought it was creating accented characters, but on closer inspection it is simply offset.

import kivy
from kivy.app import App
from kivy.uix.button import Button

class ButtonApp(App):
    def build(self):
        btn = Button(text="`push` Me!",font_name="NotoSans-Regular.ttf")
        return btn


root = ButtonApp()
root.run()

Kivy 2.0.0 image

Kivy 2.1.0

image

My current workaround is to simply use ' instead of ` for quoting

sanderland avatar Mar 09 '22 10:03 sanderland

@sanderland , I am unable to reproduce the error

Button(text="`Test`")

image

Button(text="`Test`", font_name="CascadiaMonoPL-Regular.ttf")

image

Button(text="`Test`", font_name="NotoSans-Regular.ttf")

image

Button(text="`Test` Test", font_name="NotoSans-Regular.ttf")

image

p0lygun avatar Mar 10 '22 12:03 p0lygun

Do you have this in the same directory as the app (or otherwise available?) NotoSans-Regular.zip

sanderland avatar Mar 10 '22 12:03 sanderland

tried both ways, same result (global OS scope, and local program scope)

p0lygun avatar Mar 10 '22 13:03 p0lygun

Problem happens for me: back ticks overlaying push Me!

Windows 11 SDL2 Kivy 2.2.1

Julian-O avatar Oct 31 '23 10:10 Julian-O

It is a bug in the font: https://github.com/google/fonts/issues/3094

A new version is available, and when I used it the problem was fixed.

Closing as not Kivy's fault!

Julian-O avatar Oct 31 '23 10:10 Julian-O