GithubHelp home page GithubHelp logo

Comments (6)

piersdeseilligny avatar piersdeseilligny commented on July 26, 2024

This is a font-related issue, as I can fix it by forcing pdfkit to render with a font that supports Cyrillic characters (like DejaVu Sans).

I'm currently working on 1.3.0 which will add support for custom fonts and significantly improve autocomplete. To fix this bug I'il also change the default font to one which supports non-latin alphabets.

from betterfountain.

avega avatar avega commented on July 26, 2024

Yes, I think custom fonts will be solution (if user will be able to change it in settings). Because it's not easy to find suitable cyrillic monospace font.
"Courier New" font is lite but it's supports cyrillic characters and may be other locales.

from betterfountain.

piersdeseilligny avatar piersdeseilligny commented on July 26, 2024

I'm busy changing the default font to Courier Prime, as it looks a lot nicer and supports cyrillic characters. It will be possible to change the font used in a fountain document with a Font: title page key (I'm not adding anything to the settings, as they're kind of a mess and pretty unintuitive)

from betterfountain.

avega avatar avega commented on July 26, 2024

I've installed Courier Prime and it's not support Cyrillic characters (official version), but there is modified one that supports.
So, if I get it right: editor font will be in VS Code settings, preview and PDF export - in title page key?

from betterfountain.

piersdeseilligny avatar piersdeseilligny commented on July 26, 2024

@avega Yes, that's it. Maybe I will also add an option to change the default font in the vscode settings, but I'm not sure yet.

About Courier Prime, I should have specified I'm using a version called Courier Prime Cyrillic which includes cyrillic characters in addition to Latin ones.

from betterfountain.

piersdeseilligny avatar piersdeseilligny commented on July 26, 2024

So it turns out there's going to be a problem in supporting custom fonts. I've got everything working perfectly in the live preview (it's all live, and even shows a warning in the editor if the font is unavailable). However the library to generate PDFs (pdfkit) doesn't support accessing system fonts. So if you define for example "Courier Final Draft" as a font, pdfkit won't know where to look for the .ttf files associated with the font, even if it's installed on the system.

So I'm going to disable this feature for the moment, and just switch both the live preview and the pdf renderer to using Courier Prime, which is embedded into the extension. It's nicer and supports more characters than the current default (Courier).

EDIT: Ok so actually it was easier than I thought, it's part of 1.3.0

from betterfountain.

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.