Giter Site home page Giter Site logo

Comments (10)

weihang7 avatar weihang7 commented on July 19, 2024

What browser are you using?

from pencilcode.

RoopakTJ avatar RoopakTJ commented on July 19, 2024

I was using Mozilla Firefox when that thing came.But it works perfect in chrome n other

from pencilcode.

sakagg avatar sakagg commented on July 19, 2024

I noticed the same problem - Chrome 42 / Ubuntu 14.04

from pencilcode.

davidbau avatar davidbau commented on July 19, 2024

Do you notice if the text changes font before drawing incorrectly? I
suspect a font loading problem (where the font is measured before it is
loaded, then drawn after it loads).

On Mon, Jun 8, 2015 at 11:11 AM, Saksham Aggarwal [email protected]
wrote:

I noticed the same problem - Chrome 42 / Ubuntu 14.04


Reply to this email directly or view it on GitHub
#129 (comment)
.

from pencilcode.

weihang7 avatar weihang7 commented on July 19, 2024

https://github.com/dabbler0/droplet/blob/master/src/draw.coffee#L412 loads the font asynchronously, right?

from pencilcode.

weihang7 avatar weihang7 commented on July 19, 2024

@davidbau I was able to repro the situation you described by using a slow Internet connection from China. It goes like this:
Pencilcode loads in the browser default font (e.g. Times New Roman), then the real font loads, but bounding boxes in Droplet never updates, causing the problem described in the issue.

Do you think using something like https://github.com/smnh/FontLoader could work, making droplet render after the font loads?

from pencilcode.

davidbau avatar davidbau commented on July 19, 2024

We do use FontLoader in pencilcode - a modified version that fixed some
problems I had when testing it:

https://github.com/PencilCode/pencilcode/blob/master/content/src/FontLoader.js

There are two possible problems: either our FontLoader isn't working, or
it's working but not be forcing the redraw of the palette correctly. I
think I saw it once, but the main editor in Droplet redrew while the
palette didn't. Is that what you're seeing? If you've got a reliable
repro, any chance you might be able to debug it Frank?

On Tue, Jun 9, 2015 at 1:17 AM, Weihang Fan [email protected]
wrote:

@davidbau https://github.com/davidbau I was able to repro the situation
you described by using a slow Internet connection from China. It goes like
this:
Pencilcode loads in the browser default font (e.g. Times New Roman), then
the real font loads, but bounding boxes in Droplet never updates, causing
the problem described in the issue.

Do you think using something like https://github.com/smnh/FontLoader
could work, making droplet render after the font loads?


Reply to this email directly or view it on GitHub
#129 (comment)
.

from pencilcode.

weihang7 avatar weihang7 commented on July 19, 2024

@sakagg Does it still fail for you in the latest version of Chrome? To me it seems like a Firefox-only problem(Edge and Chrome both work fine for me).

from pencilcode.

weihang7 avatar weihang7 commented on July 19, 2024

After doing some logging, it seems like editor.redrawMain() was called properly after the fonts are loaded, but Droplet did not update itself correctly. I had to manually drag stuff around for them to update. Could it be because Firefox does some lazy rendering thing?
@dabbler0, do you have an idea as to what's going on?
@davidbau That's not what I'm seeing. The main editor did not redraw.

from pencilcode.

sakagg avatar sakagg commented on July 19, 2024

Chrome is rendering it better now, but not completely correct yet.
first pencilcode

from pencilcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.