Issue with svg attribution files

109 views
Skip to first unread message

moritz...@gmail.com

unread,
Mar 7, 2018, 9:58:12 AM3/7/18
to Google Cloud Translation API
I downloaded the attribution files from:

For all svg files, "Google" is shifted a bit to left, so it's overlapping the text to its left (see attached screenshot).

Is this an issue with the svg files? Will you fix it?
overlapping_txt_in_svg.png

George (Cloud Platform Support)

unread,
Mar 7, 2018, 1:53:00 PM3/7/18
to Google Cloud Translation API
Examining the svg images titled *powered by* in the zip file you indicate, I can see that text is spaced properly and not overlapping. How do you view the files, exactly? 

moritz...@gmail.com

unread,
Mar 8, 2018, 9:02:27 AM3/8/18
to Google Cloud Translation API
I ran into the issue with chromium and chrome on linux. Both when opening the file directly with the browser and when including it in a html-page.

Currently I'm also working with some other svg files from other sources, they're all displayed "correctly" on my machine.

Just checked with IE on a windows machine, there it's not overlapping neither.

Another thing I noticed: on linux for all files the text appears in the same size. Should be 3 different sizes, though.

Any idea what might be the issue? Maybe something went wrong while generating the svgs?

George (Cloud Platform Support)

unread,
Mar 8, 2018, 11:33:27 AM3/8/18
to Google Cloud Translation API
Using here Google Chrome for Linux, all image files are displayed correctly. You may consider revising your settings for Chromium, and also clearing cookies and history. The fact that, as you mention, IE displays the same images correctly, indicates a local issue with your Chromium browser. 

moritz...@gmail.com

unread,
Mar 8, 2018, 12:23:19 PM3/8/18
to Google Cloud Translation API
By "image files" you mean the svgs?

IE was on another machine that runs windows.

On linux for me the issue remains for both Chrome and Chromium.

It's overlapping also if I open the svg files directly, so can't be due to cookies or history.

I don't know of browser settings which could impact how svgs are displayed...
Also I'm not using any addons. 

George (Cloud Platform Support)

unread,
Mar 8, 2018, 1:31:07 PM3/8/18
to google-tra...@googlegroups.com
What happens if you open the svg files directly in Windows? 

Have you tried using a different Linux distribution, to compare results for svg files displayed in that new environment? 

In a Linux environment here, svg files are displayed as expected, both in a browser, and by directly opening them. I am unable to reproduce the issue, without detailed information on your environment. Which Linux distribution are you using? What version of Chrome and Chromium? How do you open the svg files directly? 

moritz...@gmail.com

unread,
Mar 9, 2018, 9:01:02 AM3/9/18
to Google Cloud Translation API
On ubuntu 16.04 the svgs are displayed correctly for me too.
Should have checked that earlier, my bad...

What remains also on Ubuntu 16.04 in chromium (64) and firefox:
The font in files *@2x.svg and *@3x.svg is the same as in the corresponding svg without any @.

For the png *@2x.png has bigger font size than the original png...

moritz...@gmail.com

unread,
Mar 9, 2018, 9:01:02 AM3/9/18
to Google Cloud Translation API
What I was doing on windows: Open IE, push Ctrl-o, open the svg file.

On linux I was doing the same in chrome and chromium.

My env:
- arch linux (updated this week)
- chromium 65
- chrome 62

I'll check what happens on another linux machine/environment.
What's strange though: I've been working with lots of svgs in the browser (on my linux) lately, all displayed "correctly". Only except for those translate attribution svgs...

moritz...@gmail.com

unread,
Mar 9, 2018, 9:01:02 AM3/9/18
to Google Cloud Translation API

George (Cloud Platform Support)

unread,
Mar 9, 2018, 10:15:50 AM3/9/18
to Google Cloud Translation API
The fact that in Ubuntu the svg files are displayed correctly indicates that the arch linux alignment errors are a result of local processing errors on your arch linux system. The remaining Ubuntu errors should be attributed to idiosyncrasies of the local vector graphics processing, as well. The last two lines in your message, describing the errors, are not explicit, and, the result being an image, it would be helpful to have screen captures illustrating these errors. 

moritz...@gmail.com

unread,
Mar 9, 2018, 12:05:11 PM3/9/18
to Google Cloud Translation API
The text I see when opening greyscal...@2x.svg should be bigger than the text of greyscale-regular.svg, right?

On arch and ubuntu they both have the same dimensions, contrary to what's expected.

Open both files mention in any text editor:
Both files have
  • width=176px, height=16px in Line 2
  • font-size=12 in the last <text> node at the end of the file
That's why @2x.svg isn't bigger than the other file.

George (Cloud Platform Support)

unread,
Mar 9, 2018, 3:11:03 PM3/9/18
to Google Cloud Translation API
Unable to reproduce the described errors in a linux environment here. In your case on arch and Ubuntu, the software used to display the svg files might be at the origin of these occurrences. 

moritz...@gmail.com

unread,
Mar 10, 2018, 1:02:50 PM3/10/18
to Google Cloud Translation API
Sizes are hardcoded into the files (as pointed out in my last post). So very surprising you're able to see different sizes.

If you run:
vim -d greyscale-regular.svg greyscal...@2x.svg

you can see those two files are exactly the same, except for the <title> (which doesn't affect sizes).

George (Cloud Platform Support)

unread,
Mar 12, 2018, 1:42:45 PM3/12/18
to Google Cloud Translation API
Developers have been made aware of the 3-file issue. You are encouraged to open an issue of similar content in the public issue tracker, to cover the issue of the 3 identical files. In this way, you'll be notified of developments and able to keep track, till the issue is solved.  
Reply all
Reply to author
Forward
0 new messages