Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7091417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:10:58+00:00 2026-05-28T08:10:58+00:00

If I evaluate e.g. SystemDialogInput[Color] and choose a colour, lets say red, the output

  • 0

If I evaluate e.g. SystemDialogInput["Color"] and choose a colour, lets say red, the output cell shows RGBColor[1,0,0].

To view the font panel I can evaluate FrontEndTokenExecute["FontPanel"]. If I have some text highlighted somewhere I can change the font styling of the highlighted text (or cell) from the system panel that appears from the FrontEndTokenExecute. What I am wondering is if there is a way to programmatically return the chosen font settings analogous to how SystemDialogInput["Color"] returns the chosen color. For example, evaluate some code that includes choosing font settings within the system font panel, lets say manually choose Arial 12pt bold in the font panel,

enter image description here

and return e.g.

{FontFamily->"Arial",FontSize->12,FontWeight->Bold}

Just so we’re clear I’m talking about doing this without any highlighted text or cell in the notebook. One of the problems seems to be — on a Mac at least — that the font is only selected if you have highlighted something in the notebook. There are some examples like this in the documentation (ref/CurrentValue):

Style["xxxx", FontFamily :> CurrentValue["ControlsFontFamily"], 
 FontSize :> CurrentValue["ControlsFontSize"]]

This suggest that an answer is possible if the appropriate argument to CurrentValue exists but “ControlsFontFamily” and “PanelFontFamily” are not the right arguments in this case.

Also is it possible to programmatically list all fonts available on a particular computer?

Edit

@kguler has provided an answer to the final sentence and second part of my question — this could be used to build my own font panel. I have run @Heike’s code and got this (screen grab) on Mac OS X 10.6.8 with Mma 8.0.4. Note the shadowing of PropertyValue with ref/PropertyValue.

enter image description here
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:10:59+00:00Added an answer on May 28, 2026 at 8:10 am

    I think the example under Generalizations & Extentions on the help page for "FontChooser" in the documentation center does what you want. The code for that example is

    Needs["GUIKit`"]
    
    GUIRunModal[
     Widget["Panel", {
       Widget["FontChooser", {
         "showLogicalFonts" -> False,
         PropertyValue[{"chooser", "selectionModel"}, 
          Name -> "fontSelectionModel"], 
         BindEvent[{"fontSelectionModel", "change"},
          Script[updateFont[]]]
         }, Name -> "chooser"],
       Widget["TextField", {"text" -> ""}, Name -> "myTextField"],
       Script[
        fontExpr = {};
        updateFont[] := Module[{newFont},
          newFont = 
           PropertyValue[{"fontSelectionModel", "selectedFont"}];
          fontExpr = {
            FontFamily -> PropertyValue[{newFont, "family"}],
             FontSize -> PropertyValue[{newFont, "size"}], 
            FontWeight -> 
             If[PropertyValue[{newFont, "bold"}], "Bold", "Plain"], 
            FontSlant -> 
             If[PropertyValue[{newFont, "italic"}], "Italic", "Plain"]
            };
          SetPropertyValue[{"myTextField", "text"}, ToString[fontExpr]];
            ];
          ],
       BindEvent["endModal", Script[ fontExpr]]
       }]
     ] 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to evaluate a list of statements for a Cell (e.g. has top
I start to evaluate Red Gate's ANTS Profiler to profile my WPF application. I
Say I need to evaluate a expression as true or false starting from a
How to evaluate whether a career coach is beneficial?
I'm trying to evaluate the purchase of a statistical tool. This will be used
I need to evaluate a mathmatical expression that is presented to me as a
I would like to evaluate .NET as a development platform for a desktop application.
I am trying to evaluate the answer provided here , and am getting the
How does Python evaluate the expression 1+++2 ? How many ever + I put
How can I evaluate whether a column contains any non-ascii characters in mysql? In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.