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

Allow setting font within a TextView #7

Closed
retupmoca opened this issue Feb 6, 2015 · 6 comments
Closed

Allow setting font within a TextView #7

retupmoca opened this issue Feb 6, 2015 · 6 comments

Comments

@retupmoca
Copy link
Contributor

No description provided.

@jonathanstowe
Copy link
Contributor

Hi,
I think that it's something that would have to be implemented for all widgets by implementing the pango font stuff:

https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-font-options

because that will require a whole bunch of other stuff regarding Pango to be implemented I don't think it's something that will get done immediately.

The only interface regarding the font on the text view is toggling between proportional and monospace:

https://developer.gnome.org/gtk3/stable/GtkTextView.html#gtk-text-view-set-monospace

That is quite doable and I'll have a look today.

Hope that helps.

@jonathanstowe
Copy link
Contributor

I am however going to do #28 before adding any more properties to the interface.

jonathanstowe added a commit that referenced this issue May 19, 2016
This partially addresses #7 however a more complete solution
(allowing setting of an arbitrary font on the widget,) requires
the implementation of gtk_widget_set_font_map and all the
attendant Pango bizness.
@finanalyst
Copy link
Owner

I implemented pango for Label, see MarkUpLabel.

Very simple changes to Label. But I don't know how general these change can be

@finanalyst
Copy link
Owner

Ignore last remark. My bad. Marked label is just a call to gtk_marked_label. It uses pango internally, but can't be generalised.

@finanalyst
Copy link
Owner

With GTK 4 launched, this enhancement for GTK 3 require a huge amount of effort. Not cost effective, so closing. MarkUpLabel allows for coloured text and should meet most font type issues.

@Xliff
Copy link

Xliff commented Dec 29, 2020

Please note that there is p6-Pango. It's still experimental, but I have found it workable enough. Would be nice to get more eyes on it so I can find and eliminate any bugs that are there.

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

No branches or pull requests

5 participants