Libgdx Android: Commas and dots not showing - libgdx

I'm using a FreeTypeFont where I set the parameter size and also scale the font.
In desktop commas and dots are showing, e.g. "1.000.000" but when I run it in Android it becomes "1 000 000"
Any thoughts on how to solve this problem?

I solved this by setting the maximu texture size.
FreeTypeFontGenerator.setMaxTextureSize(2048)

Sometimes the default Texture filters can cause small images to disappear, try this:
font.getRegion().getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);

Related

Decal Batch doesn't work on all devices Libgdx

I tried rendering using Libgdx's DecalBatch on my phone and my friend's phone. It's rendering a 2D image with thickness.
A decal at the front and back side is created, then individual decals for every pixel at its side.
Then, I flush (render) the decals.
On my phone, it gave this result:
It worked as expected.
However, on my friend's phone, it didn't render at all:
It didn't work as expected.
How do I fix this? Or is it a bug in Libgdx?
I've got it working now!
I forgot to add this one line of code:
Gdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
I mainly forgot to put the depth buffer bit.
Anyways, thank you to everyone who has helped.

gizmo based on Three.js is not visible

I created Forge viewer app w/ Transformation Extension based on GitHub sample "forge-extensions", for unknown reason, gizmo is not visible after I click on element, only very small yellow dot after zoom in, I believe it's element center point and gizmo size is too small, so my question is how to control it? in fact, all the coding is copied from that GitHub sample "forge-extensions", I must miss something simple!
Have you tried your code with different types of models, and does it behave the same for all of them? I believe it may have something to do with the scale of the particular model, especially when looking at these lines of code from the viewer extension:
_transformControlTx.setSize(
bbox.getBoundingSphere().radius * 5);
Try and put a breakpoint there, and see what the radius is. Or try adjusting the hard-coded value.

Can't set UITabBar shadowimage in iOS 13

After upgrading to iOS 13, several tab bar related issues have appeared. I have fixed most, but the remaining one is being unable to overrride the tabbar's shadowimage. The following code worked in iOS 12 and lower:
[[UITabBar appearance] setShadowImage:[UIImage imageName:#"CustomTabBarShadowImage"]];
I tried to override it by setting the new "standardAppearance" attributes. That does work, but I use a custom font in my app and no matter what I do, the tabbaritem titles seem to be limited to the tab icon width and therefore cut off.
That leaves 2 questions please:
Any ideas how to get a custom tabbar shadowimage in iOS 13 without using standardAppearance?
How to prevent tabbaritem titles being cut-off when using a custom font? (Note that I set them using the new UITabBarItemStateAppearance methods)
PS: As to number 1, I have found a hack to work around it - I simply add a uiview with frame CGRectMake(0, -0.5, [UIScreen mainScreen].bounds.size.width, 0.5) to the tab bar- ugly but it works.

Possible SVG Path Chrome Bug

I'm experiencing a possible bug with the path element in Chrome. I have copy/pasted what RaphaelJS has rendered here: http://petesaia.com/work/svg-chrome-bug/
In Safari & Firefox
(source: petesaia.com)
In Chrome (19.0.1084.46)
(source: petesaia.com)
Obviously there are very many points in this file which is why I limited 50 points per path element. As you can see, 2 paths are missing from the right side and 2 very small paths are missing from the left side. I found one of the paths that is not displaying and singled it out. You can see that here: http://petesaia.com/work/svg-chrome-bug/singled.html
You will notice that even when the path is singled out it still doesn't show. So Chrome must dislike something with that path.
I also noticed that sometimes it displays correctly, usually when I open and close the javascript console. It's very flimsy. I've experimented with changing stroke and weight and also no luck.
Has anyone experienced anything like this?
New discovery: These x/y values are the coordinates that break the single.html sample: 620.3536711111101,232.16932207146056 I know this because when you truncate the path up to that point it works perfectly. However, I still have no idea as to why they would break it.
Thanks,
Pete
PS: I do plan on simplifying the shape(s) but this has caught my attention first.

How to capture zoomable image as one high resolution image?

I would like to capture a zoomable image at a high resolution zoomed at 3x. Do you know of a way I can piece this image together without having to do it manually? Here is the image
After using bhups' solution, tweaking outputxand outputy for a good while, I tried something else.
I went back to the object page (in the above example, here), took the thumbnail image URL (http://www.metmuseum.org/Imageshare/ep/regular/DP145931.jpg), replaced regular with zoom and to my surprise got what I presume is the full image, with less effort:
http://www.metmuseum.org/Imageshare/ep/zoom/DP145931.jpg
You can tweak the URL to get the job DONE. Here is the URl for 3x image. http://media.metmuseum.org/mgen/metzoom/zoom3.ms?img=DP145931.jpg&wrapperid=11&outputx=1200&outputy=1601.067378252168&level=1&x=0&y=0&backcolor=0x00000
outputx and outputy are the output image dimensions. level implies the zoom level. and x and y are the top left corner of the selected rectangle.