New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a custom theme #47
Comments
Hi @AaronLatnok I am glad you like it :). You can always modify the font of a theme, if you see the Theme class there's 3 properties you can use to modify this: /// Regular font to be used by this theme
open var codeFont : RPFont!
/// Bold font to be used by this theme
open var boldCodeFont : RPFont!
/// Italic font to be used by this theme
open var italicCodeFont : RPFont! And, if you want to get the font variations automatically populated from a regular font you can also use: Now, even if there's no public API for modifying the color of the fonts, you can still achieve this by modifying directly the CSS theme files that are included with the project, they are just regular CSS files, that you can easily de-minify and change as you wish. Let me know if you need a more elaborated example on how to do this. Best! |
Thank you so much Raspu, you helped me a lot! Done it without any problem Thanks a lot for the patience and a huge thanks for the help, I started to learn Swift just a month ago and for me everything is new |
Hi, I am glad you were able to make it work! About removing themes and languages, did you try just deleting the JS files and the CSS files? I never tried this myself tbh... If that doesn't work you can always make a list of theme and languages yourself and present that as the only option to the user, no need of modifying the library itself... But if you really need to avoid including those files in your project you'll probably need to build a new delivery from the original highlighter.js, but I am not really sure if there's any option for limiting the langs or themes... (If you try this, make sure to build it with the CDN option). Let me know if you make it work, if not I can try to make build myself... Best! |
Hi @AaronLatnok, I am going to close this issue for now, feel free to re-open it if you have more questions. |
Hi Raspu,
Thank you for your amazing work.
I have a question: is it possible to create a custom theme?
Or in another way, is it possible to change the font and the color of the text? Because I have read something about it on other issues but I haven't understood it very well
Thank you for your patience
The text was updated successfully, but these errors were encountered: