Skip to content
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

color palettes #7

Open
RustoMCSpit opened this issue May 25, 2024 · 19 comments
Open

color palettes #7

RustoMCSpit opened this issue May 25, 2024 · 19 comments

Comments

@RustoMCSpit
Copy link

https://colorhunt.co/

using color palettes can make the fonts look prettier than then do now

@brummer10
Copy link
Owner

I like the colors in use. If you like to play with the used colors, check the file CairoColourTheme.hpp
The color names should be pretty much self explain.

https://github.com/brummer10/ToneTwistPlugs/blob/main/plugins/CairoWidgets/CairoColourTheme.hpp#L219

that's were the general colors been set, it's the cairo RGBA format.
Additional, in every plugin maybe a color overwrite in the file UIPluginName.cpp in the constructor, like here for example:

https://github.com/brummer10/ToneTwistPlugs/blob/main/plugins/MetalTone/UIMetalTone.cpp#L23

If you need a Color Picker to get the cairo RGBA data from a pallet, here is the one I use:

https://github.com/brummer10/CairoColorPicker

as you are used to compile those plugs yourself, the CairoColorPicker should be a easy task for you.

@RustoMCSpit
Copy link
Author

never heard of cairo??

@RustoMCSpit
Copy link
Author

@brummer10
Copy link
Owner

exact.
and this is cairo
https://www.cairographics.org/

it is used by a widespread amout of apps and widget toolkits like Ardour, LSP plugins, GTK3/4, . . .

@RustoMCSpit
Copy link
Author

right...

do you have github actions on? can i just copy and paste in some values and have it automatically build and check it out?

@brummer10
Copy link
Owner

Github action works on this repository, but you cant write to it.
That should be done locally on your computer. As you already know how to compile the plugs, you could just edit the source with a text editor and recompile them to check the results. That's much easier and faster then using github action.

@RustoMCSpit
Copy link
Author

Github action works on this repository, but you cant write to it. That should be done locally on your computer. As you already know how to compile the plugs, you could just edit the source with a text editor and recompile them to check the results. That's much easier and faster then using github action.

and how do i go about changing the font before i start doing this?

@brummer10
Copy link
Owner

All widgets been located in the folder plugins/CairoWidgets/
they all could use there own font, so for example the plugin name on the big PushButton is set here:
https://github.com/brummer10/ToneTwistPlugs/blob/main/plugins/CairoWidgets/CairoPushButton.hpp#L132

       cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
                                   CAIRO_FONT_WEIGHT_BOLD);

you will find this line in every widget. "Sans" set the font to use.

@RustoMCSpit
Copy link
Author

and where do i store the fonts so it can be accessed by the program

@brummer10
Copy link
Owner

You must install the font as usual for fonts:
https://wiki.debian.org/Fonts

@RustoMCSpit
Copy link
Author

You must install the font as usual for fonts: https://wiki.debian.org/Fonts

yeah but how do i pack it inside the plugin

@brummer10
Copy link
Owner

You don't.
Even if you pack a font together with a plugin, you install the font during plugin installation.

@RustoMCSpit
Copy link
Author

wait are you thinking of a .deb package? im thinking of building it as a .clap with the font inside, why cant a font be stored as an asset i am confused

@brummer10
Copy link
Owner

wait are you thinking of a .deb package?

No

why cant a font be stored as an asset

because cairo_select_font_face() looks only for installed fonts, it's not possible to load a font from asset into cairo.

@RustoMCSpit
Copy link
Author

so this is a limitation of your chosen framework cairo. may i ask why cairo cant select a font that its an asset folder?

@RustoMCSpit
Copy link
Author

wheres the cairo github, i want to link this issue

@brummer10
Copy link
Owner

You got it wrong. What I said is that cairo_select_font_face() can't load a font from asset. To do so one have to use the cairo glyph api.

@RustoMCSpit
Copy link
Author

You got it wrong. What I said is that cairo_select_font_face() can't load a font from asset. To do so one have to use the cairo glyph api.

no i understand i was just asking where the github was so i could make an issue request but apparently i dont need to because they have an api. still, i'll need to see its documentation and i cant find it online for soem reason

@brummer10
Copy link
Owner

I give you the link already above
https://www.cairographics.org/
click on "Documentation"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants