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

Microcontroller icon text and font size #186

Closed
tbeu opened this issue Dec 26, 2016 · 9 comments · Fixed by #198
Closed

Microcontroller icon text and font size #186

tbeu opened this issue Dec 26, 2016 · 9 comments · Fixed by #198

Comments

@tbeu
Copy link
Collaborator

tbeu commented Dec 26, 2016

The font (size) in icon Modelica_DeviceDrivers.EmbeddedTargets.AVR.Blocks.Microcontroller is intrepreted differently in three tested tools:

Dymola 2017 FD01
dymola_blink

MWorks Sysplorer 2016
mworks sysplorer_2016_blink

SimulationX 3.8
simx_blink

Not sure what the desired behaviour is and if this is a MLS issue actually.

See #170 for the general issue on MCU support.

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 19, 2017

@sjoelund Did you had a look on this?

@sjoelund
Copy link
Contributor

Changing size to 0 would probably work fine (renders in almost the exact same size in OMEdit). Odd that each tool has a vastly different size for 30 pt though. SimulationX looks like it's 200~250 pt. The Real-time block is rendered decently in all tools and that uses size=0 for the font size.

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 19, 2017

Yes, strange indeed.

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 19, 2017

I believe the problem is the extent interpretation for font size > 0. It looks like its size can be neglected and is only considered for font size = 0.

@sjoelund
Copy link
Contributor

Yes, but that doesn't answer why the font size is so different in the different tools...

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 19, 2017

Fixed font size is similar for Dymola and SimulationX. What looks different is the vertical size of the line break.

2017-01-19 10_00_43-unnamed - simulationx 3 8 professional edition

model A
  annotation(
    Icon(
      graphics={
        Text(
          extent={{-450,450},{450,-450}},
          lineColor={28,108,200},
          fontName="Arial",
          textStyle={TextStyle.Bold},
          textString="ABCD\nABCDEF",
          fontSize=30),
        Rectangle(
          extent={{-100,100},{100,-100}},
          lineColor={28,108,200})}));
end A;

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 19, 2017

FYI: I'll file a SimulationX ticket for neglecting the extent in case of an absolute font size.

@dietmarw
Copy link
Member

dietmarw commented Jan 20, 2017

OMEdit:

image

@tbeu
Copy link
Collaborator Author

tbeu commented Jan 20, 2017

MWorks:
2017-01-20 11_48_35-mworks sysplorer 2016 demo - model2

sjoelund added a commit to sjoelund/Modelica_DeviceDrivers that referenced this issue Jan 23, 2017
This fixes modelica-3rdparty#186, where fonts are displayed in different sizes in
different GUIs when the font size is absolute.
sjoelund added a commit to sjoelund/Modelica_DeviceDrivers that referenced this issue Jan 23, 2017
This fixes modelica-3rdparty#186, where fonts are displayed in different sizes in
different GUIs when the font size is absolute.
sjoelund added a commit to sjoelund/Modelica_DeviceDrivers that referenced this issue Jan 23, 2017
This fixes modelica-3rdparty#186, where fonts are displayed in different sizes in
different GUIs when the font size is absolute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants