Closed The0x539 closed 8 years ago
any suggestions? I don't think this will be easy given how we make the gilded status a SpannableText. Doubt we'd be able to use an image.
Best we'd be able to do (for the easiest fix) is this: http://www.fileformat.info/info/unicode/char/2606/index.htm
But that looks ugly.
If the font being used has the full star looking odd it would likely be the same for the empty one, as they're just one code point apart. Roboto doesn't provide a glyph for either unfortunately so it falls back to a local one. The normal one you'd expect to see is provided by noto sans symbols, might be possible to include a copy of the font.
Could also just blame Samsung for letting people set weird fonts as default
I always blame Samsung.
I think we should include a copy of the Noto Emoji font file. There is a black and white version available that only weighs in at 248KB.
I think 0.25mb is quite a lot for such a small issue, I'm against this.
The individual glyph(s) needed could be easily extracted and repackaged, however I think the bigger challenge is setting the fallback font which I couldn't find a good way of doing. That or we would need to patch in the extra glyphs to the included roboto typefaces
I agree that the size is too large, but we could definitely extract the single glyph. Honestly though, this sounds like a lot of work for a Samsung issue.
Adding an image to a SpannableText is possible and it's not even that hard:
int fontsize = a.getDimensionPixelSize(R.styleable.FontStyle_font_cardtitle, -1);
float aspectRatio = (float) (1.00 * image.getWidth() / image.getHeight());
image = Bitmap.createScaledBitmap(image,
(int) Math.ceil(fontsize * aspectRatio),
(int) Math.ceil(fontsize), true);
icon.setSpan(new ImageSpan(mContext, image), 0, icon.length(), 0);
If anyone has a recommendation for what icon to use (Original reddit gold icon?) I could implement it.
As long as you're still able to see the number of times gilded, feel free to use whatever icon. I say go with the original Reddit Gold icon. Make sure it's solid white.
Just read up on Reddits licencing terms. Using reddits icons (even in reddit apps) is only possible with reddits approval: https://www.reddit.com/wiki/api (point 4).
I'll use a placeholder icon for now. Maybe someone could ask reddit for permission to use the gold icon later. Or we make our own.
Boo. For now, find a vector star. Something simple. If you need help finding one, let me know. More than happy to help with semantics.
Should be done now!
Looks weird on my aunt's S6 the way it is, it's gray and 3D.