New topic: 

Webcanvas - Fuzzy text

<http://forums.realsoftware.com/viewtopic.php?t=47421>

         Page 1 of 1
   [ 10 posts ]                 Previous topic | Next topic          Author  
Message        MadDoc          Post subject: Webcanvas - Fuzzy textPosted: Wed 
Mar 27, 2013 2:48 pm                                 
Joined: Wed Oct 05, 2005 1:21 pm
Posts: 513
Location: United Kingdom                I'm hoping this is a simple problem.

I have a subclass of WebCanvas called MyWebCanvas. In the Paint() event are 
these three lines of code:

g.ForeColor = &cFF0000
g.TextSize = 16
g.DrawString("My custom canvas", 5, 15)


The output is this:



As you can see, the text is all blurry, not clear. This is the only code in the 
web app. Is there someway to turn on anti-aliasing or some other setting I'm 
overlooking?

Using Safari on 10.8.3

Thanks,      
_________________
Gorgeous REALbasic controls from Figa Software | My Flickr  | My Blog
11" MacBook Air 1.8Ghz i7, 4GB RAM, OSX 10.8.2, RB 2012 r1.1 Pro | iPhone 4S 
32GB | Nikon D60  
                             Top                Bob Keeney          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 4:07 pm             
                    
Joined: Fri Sep 30, 2005 11:48 am
Posts: 3479
Location: Lenexa, KS                I had this exact same problem and could not 
solve it.  The problem seems to be that the console app graphics engine is 
really bad with text.

For my reporting tool I had to abandon rendering in Web Apps and had to output 
directly to HTML.      
_________________
Bob K.

Real Word Processing for your Real Studio Applications with Formatted Text 
Control
http://www.bkeeney.com/formatted-text-control/  
                             Top                MadDoc          Post subject: 
Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 4:44 pm                      
           
Joined: Wed Oct 05, 2005 1:21 pm
Posts: 513
Location: United Kingdom                Not what I wanted to hear Bob but I 
appreciate the honesty     
_________________
Gorgeous REALbasic controls from Figa Software | My Flickr  | My Blog
11" MacBook Air 1.8Ghz i7, 4GB RAM, OSX 10.8.2, RB 2012 r1.1 Pro | iPhone 4S 
32GB | Nikon D60  
                             Top                taylor-design          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 5:54 pm             
            
Joined: Wed Mar 22, 2006 11:15 am
Posts: 637
Location: Southern California                Does the built in canvas actually 
render text on the server and send an image?

The jCanvas control in my toolkit sends the text to the browser to be rendered 
there. This means you have to use fonts that will be on the browser or Google 
Fonts. But if the browser engine implements high quality text rendering for the 
canvas element you should see it.

Unfortunately I just found a text related bug in my jCanvasToRbGraphics class 
which lets you use jCanvas like a Graphics object. And this is the foundation 
for the demo on my site where you can type in your own drawing code to see what 
stuff looks like. I'll upload an updated demo tonight and post sample code for 
that demo page. That way you can test different fonts and sizes, on different 
browsers, and try it out.      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top                Bob Keeney          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 6:50 pm             
                    
Joined: Fri Sep 30, 2005 11:48 am
Posts: 3479
Location: Lenexa, KS                I think there's a difference between 
drawing the paint event vs the creating a picture and sending it down.  It's 
been too long since I did it but the image rendered on the Web App had truly 
awful text.  I think in my testing the drawing text in the paint event was 
crisp as all the rendering was done on the client.

Again, it's been too many brain cells ago so I might be totally off.      
_________________
Bob K.

Real Word Processing for your Real Studio Applications with Formatted Text 
Control
http://www.bkeeney.com/formatted-text-control/  
                             Top                rlitchfield          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 8:09 pm             
            
Joined: Thu Feb 25, 2010 4:50 pm
Posts: 105                I've noticed the same problem and have been forced to 
use WebLabel instead.  This is less then practical for me, when building menus. 

Robert   
                             Top                taylor-design          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Wed Mar 27, 2013 11:51 pm            
             
Joined: Wed Mar 22, 2006 11:15 am
Posts: 637
Location: Southern California                MadDoc wrote:As you can see, the 
text is all blurry, not clear. This is the only code in the web app. Is there 
someway to turn on anti-aliasing or some other setting I'm overlooking?

I've tested your code in both WebCanvas and jCanvas, FireFox 19 and Safari 6, 
on Mac OS 10.7.5. In all cases the rendered text is better then your 
screenshot, and identical with both controls.

I should note that the font is defaulting to Arial in both controls.

* Is your project defaulting to Arial?

* Is the default font, whatever it is, installed on your Mac?

* Are you using the latest version of Real Studio?

* What does it look like in FireFox?

I'm really curious as to what's going wrong here. I would love to pitch the 
features and advantages of jCanvas. But if your only issue is poorly rendered 
text, you should be able to get a clean rendering with WebCanvas.      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top                taylor-design          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Thu Mar 28, 2013 3:01 pm             
            
Joined: Wed Mar 22, 2006 11:15 am
Posts: 637
Location: Southern California                If you want to try out the jCanvas 
control in Web Custom Controls...

* Go to: http://webcustomcontrols.com:8084/
* In the list box, double click the jCanvasToRbGraphics demo.
* Paste the code below into the text box on the left side and click Draw.

I'm curious to see if you get nicely rendered text or something similar to your 
original screenshot.

ClearRect(0, 0, 500, 500)
TextFont = "Arial"
TextSize = 16
ForeColor = rgb(255,0,0)
DrawString("My custom canvas", 15, 5)
      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top                rlitchfield          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Thu Mar 28, 2013 8:03 pm             
            
Joined: Thu Feb 25, 2010 4:50 pm
Posts: 105                taylor-design wrote:I'm curious to see if you get 
nicely rendered text or something similar to your original screenshot.


Just gave your demo a run and it looks the same as using the RS rendering.

Robert   
                             Top                taylor-design          Post 
subject: Re: Webcanvas - Fuzzy textPosted: Thu Mar 28, 2013 8:45 pm             
            
Joined: Wed Mar 22, 2006 11:15 am
Posts: 637
Location: Southern California                rlitchfield wrote:taylor-design 
wrote:I'm curious to see if you get nicely rendered text or something similar 
to your original screenshot.


Just gave your demo a run and it looks the same as using the RS rendering.

Robert

Can you take a screenshot? Also: what OS and browser? Thanks!      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 10 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to