Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Font renderer fuckery.

Hi. I've been working on a non-bitmap based ttf font renderer for a while but today I noticed that some characters render oddly sometimes. i(dot)imgur(dot)com/Wij7mCO(dot)png I made my arraylist just "iii" to show the problem, every 5 strings it will render the 'i' without the gap. I'm assuming its opengl scaling not scaling it the way I want it to. This also makes the shadow a bit bigger, which I also think is a scaling problem.

Heres the code :
pastebin(dot)com/raw/Kjx1aaET (Sorry for extreme over-documentation)

Anyone have any ideas on how I could fix this?
I think I see your problem here, in your links you have (dot) instead of . try using a . instead and maybe the I's will render properly?

If this doesn't work, maybe you are using an L instead of an I?
(Jan 10, 2017 11:38 AM)rederpz Wrote:  snippo

Shit man your right.
(Jan 10, 2017 11:48 AM)PersonOfThePeoples Wrote:  Shit man your right.

You're*
(Jan 10, 2017 12:33 PM)Ygore Wrote:  You're*

no stupid he said its my right you don't say it's you are right you dingle
I cleaned up the formatting of the code for anyone interested in taking a look at it. You can find it here, in all of its comment-free and indented glory.
Just a general note, don't comment like this. Comments in your code should be the exception for circumstances in which you've made some truly interesting functionality deserving of a more in-depth explanation. Instead of clarifying the intention of the code, the comments here just obscure it. I mean come on.
I saw 'cout' being shifted "Hello world" times to the left and stopped right there.
(Jan 10, 2017 04:20 PM)|Foundry Wrote:  snip

ok ill look at it now

PHP Code

<?php 
private static final int MARGIN = 4;
    private static final 
char COLOR_INVOKER = '\247';
    private static 
int RANDOM_OFFSET = 1; 

constants??????

PHP Code

<?php 
public TTFFontRenderer(Font font, int characterCount) {
        
this(font, 256, false);
    } 

this parameter is not necessary sir

PHP Code

<?php 
GL11
.glBegin(GL11.GL_QUADS); {
            
GL11.glTexCoord2f(0, 0);
            
GL11.glVertex2d(x, y);
            
GL11.glTexCoord2f(0, 1);
            
GL11.glVertex2d(x, y + charData.height);
            
GL11.glTexCoord2f(1, 1);
            
GL11.glVertex2d(x + charData.width, y + charData.height);
            
GL11.glTexCoord2f(1, 0);
            
GL11.glVertex2d(x + charData.width, y);
        }
        
GL11.glEnd(); 

this looks stupid to me

in conclusion the issue may be with ur shadows question mark or idk
Why not just make use of Minecraft's DynamicTexture class?
(Jan 10, 2017 11:38 AM)rederpz Wrote:  I think I see your problem here, in your links you have (dot) instead of . try using a . instead and maybe the I's will render properly?

If this doesn't work, maybe you are using an L instead of an I?

any eta when you're gonna start going outside and doing something?
yea so general omni decided its cool to remove months of my -3's so if i gave u one plez remind me on my monthly scheduled visit so i can replace it ty

[Image: MzF1ZV2.png]
(Jan 11, 2017 11:56 PM)ddong Wrote:  any eta when you're gonna start going outside and doing something?

when outside comes to me fam too lazy
(Jan 12, 2017 10:53 AM)rederpz Wrote:  when outside comes to me fam too lazy

yeah i've noticed from various pictures
yea so general omni decided its cool to remove months of my -3's so if i gave u one plez remind me on my monthly scheduled visit so i can replace it ty

[Image: MzF1ZV2.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Verify69Jul 28, 2019 08:55 PM 0 123 Jul 28, 2019 08:55 PM
Last Post: Verify69
by Verify69Jul 27, 2019 08:46 PM 2 120 Jul 27, 2019 08:46 PM
Last Post: Verify69
by Verify69Jul 26, 2019 10:30 AM 2 149 Jul 26, 2019 10:30 AM
Last Post: Verify69