Comments (14)
Just find a way to fix :
Find this line
_tilemap = new Tilemap(tileMapWidth, tileMapHeight, font.tileset);
Add this.smoothing to the end
_tilemap = new Tilemap(tileMapWidth, tileMapHeight, font.tileset,this.smoothing);
from bitmapfont.
@MiltonW what about my latest push? does it work as you prefer?
from bitmapfont.
I think so, but I seem to have a problem with Flash (and HTML5).
Same code, no Flash conditionals.
This occurs when I have
text_retro.size = 0.57;
If I don't use that (or use a nice round integer) it looks just as good as the other targets.
But if I then try to use text_retro.scaleX = 0.57 I get:
Invalid field access : set_scaleX
So I can't use the DisplayObject scaling anymore, which I would guess would not distort the image.
from bitmapfont.
let me think about it
from bitmapfont.
@MiltonW sorry that i haven't worked on it earlier, but i think i've fixed this issue.
could you try updated code?
from bitmapfont.
No change I think. When I use HTML5/Flash I have the following behaviour:
text_retro.size = 0.57;
text_retro.scaleX = 0.57; text_retro.scaleY = 0.57;
Since scaleX/Y seems to work it is not really a problem (for me anyway :) ). Can't reproduce the 'Invalid field access : set_scaleX' anymore.
PS. Does look a bit smoother now that I look at it, but I don't think it has to do with smoothing...
from bitmapfont.
strange. this is what i've got on flash target with latest code (with size set to 0.57):
smoothing off
smoothing on
from bitmapfont.
Yeah, a bit smoother, but what does it look like without size, and then scale it with scaleX/Y?
from bitmapfont.
it looks the same
from bitmapfont.
ok, here is another one fix.
it looks like if you change Bitmap's bitmapData then smoothing isn't applying to it anymore. so we have to reapply smoothing
from bitmapfont.
It all doesn't seem to make a difference. All the smoothing does is smooth the jagged edges. The edges aren't there if I don't use size. So then I can use scaleX/Y and it stays crisp.
Try going fullscreen or even bigger and try to keep it this clean, no edges at all:
Again, if I then comment scaling, and use size:
This is only on Flash/HTML5. Using size = 0.57 and scaling the entire stage by 3.
from bitmapfont.
oh, so you were scaling stage also. and i've tested without it.
I guess it will be impossible to achieve this by using size then
from bitmapfont.
No, I'm not scaling the stage, that was just to make the difference more obvious.
from bitmapfont.
Hi there ,@Beeblerox Now how to disable smoohting ?
I'm using this frok by @flowplay
https://github.com/flowplay/BitmapFont
angelCodeField.smoothing = false; // not working , it's always smoothing, I'm using pxiel font , so need to be non-smoothing
p.s. when set scale to 2 , it's smoothing with white blurry border
Thanks
from bitmapfont.
Related Issues (20)
- add border and borderColor properties
- Haxelib HOT 2
- Stage3D support
- Shadow always blue for RENDER_BLIT targets
- BitmapTextAlign.RIGHT crops text when textfield.size not an integer HOT 5
- implement kerning
- the bitmapfont work bad in preloader of html5 HOT 3
- Having some issues with latest version of openfl
- html5 target with -Dwebgl HOT 1
- Background transparency issue when using blitting
- Not compatable with OpenFl 4.0.0 HOT 2
- BitmapFont -> format library HOT 1
- Saving BitmapData with pixelsnapping
- Make shadow offset customizable
- Make outline width customizable
- Try to implement .type property HOT 1
- lineSpacing - issue HOT 6
- Add noColor field HOT 1
- Change PxBitmapFont's getPreparedGlyphs() method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitmapfont.