Bug 68346

Summary: ACCESSIBILITY: Accessibility bridge should expose the font name
Product: LibreOffice Reporter: Niklas Johansson <sleeping.pillow>
Component: UIAssignee: Niklas Johansson <sleeping.pillow>
Status: RESOLVED FIXED    
Severity: normal CC: sleeping.pillow
Priority: medium    
Version: 3.3.0 release   
Hardware: Other   
OS: Windows (All)   
Whiteboard: target:4.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 60251    

Description Niklas Johansson 2013-08-20 17:19:42 UTC
The font name should be exposed to the accessibility bridge as the characterattribute called fontfamily. At the moment the information given to the Accessibility bridge is if the font is Monospaced or Proportional.

I'm not completely sure but I believe that exchanging the attribute "CharFontPitch", with "CharFontName" here:
http://opengrok.libreoffice.org/xref/core/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java#37

Adjusting the following if-else-block to expose the attribute:
http://opengrok.libreoffice.org/xref/core/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java#298

Might fix the problem, but probably there is more to it.

I'm not currently able to build on Windows, so I can't really try it out either. :(

The issue seems to be inherited from OpenOffice.org so I'm setting 3.3.0 as version.
Comment 1 Caolán McNamara 2013-09-01 19:38:19 UTC
Maybe the original code did this because the docs mention "Monospaced", but googling around I see plenty of examples of setting real font names via setFontFamily so it seems to make sense to do that instead.

http://docs.oracle.com/javase/1.4.2/docs/api/javax/swing/text/StyleConstants.html#getFontFamily%28javax.swing.text.AttributeSet%29
Comment 2 Commit Notification 2013-09-01 19:46:48 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=277b339371727134851da1b695d9d8d30889a961

fdo#68346 Accessibility bridge should exspose the font name.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.