brummer10 / ToneTwistPlugs

Multi-format LV2|VST2|VST3|CLAP|AU multi-arch Linux|macOS|Windows audio effect plugs using the DISTRHO Plugin Framework
44 stars 0 forks source link

color palettes #7

Open RustoMCSpit opened 3 months ago

RustoMCSpit commented 3 months ago

https://colorhunt.co/

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

brummer10 commented 3 months ago

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 commented 3 months ago

never heard of cairo??

RustoMCSpit commented 3 months ago

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

so is that the default

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

and thats the default overridden with new values for Metal Tone?

brummer10 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

brummer10 commented 3 months ago

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

RustoMCSpit commented 3 months ago

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 commented 3 months ago

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

RustoMCSpit commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

wheres the cairo github, i want to link this issue

brummer10 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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