Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Update font tools and font references in ui files
Browse files Browse the repository at this point in the history
  • Loading branch information
srevinsaju committed Sep 2, 2020
1 parent ef7ebe9 commit 8d1d206
Show file tree
Hide file tree
Showing 9 changed files with 25,287 additions and 25,322 deletions.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

[![Updates](https://pyup.io/repos/github/srevinsaju/guiscrcpy/shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/)[![Python 3](https://pyup.io/repos/github/srevinsaju/guiscrcpy/python-3-shield.svg)](https://pyup.io/repos/github/srevinsaju/guiscrcpy/)[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/guiscrcpy?style=flat-square)![PyPI](https://img.shields.io/pypi/v/guiscrcpy?style=flat-square)![PyPI - Wheel](https://img.shields.io/pypi/wheel/guiscrcpy?style=flat-square)![PyPI - Downloads](https://img.shields.io/pypi/dm/guiscrcpy?color=dark%20green&logo=PYPI&logoColor=Green&style=flat-square)](https://pypi.org/project/guiscrcpy)

[![Get guiscrcpy AppImage](https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.srevinsaju.me%2Fget-appimage%2Fguiscrcpy%2Fshields.json)](https://www.srevinsaju.me/get-appimage/guiscrcpy/)

[![AUR version](https://img.shields.io/aur/version/guiscrcpy?label=Arch%20Linux%20Package&style=flat-square)](https://aur.archlinux.org/packages/guiscrcpy)
[![guiscrcpy](https://snapcraft.io//guiscrcpy/badge.svg)](https://snapcraft.io/guiscrcpy)
[![GitHub All Releases](https://img.shields.io/github/downloads/srevinsaju/guiscrcpy/total?style=flat-square)](https://github.com/srevinsaju/guiscrcpy/releases)
Expand Down
43 changes: 2 additions & 41 deletions guiscrcpy/platform/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,47 +103,8 @@ def create_desktop(desktop_file=None,

@staticmethod
def install_fonts():
"""
Install fonts to ~/.fonts.
The fonts being installed is Titillium Web ~
https://fonts.google.com/specimen/Titillium+Web
Open Source Approved fonts.
# TODO support for SystemWide Installation
:return: True if installation successful, else False
"""
sys_font_dir = os.path.join(os.path.expanduser('~'), '.fonts')
if not os.path.exists(sys_font_dir):
os.makedirs(sys_font_dir)

try:
from fontTools.ttLib import TTFont
except ModuleNotFoundError as e:
logging.error(
"Error Installing the fonts. "
"You might have to manually install the fonts"
"Titillium Web : "
"https://fonts.google.com/specimen/Titillium+Web "
"Error: {}".format(e)
)
return False

font_dir = os.path.join(os.path.abspath(
os.path.dirname(os.path.dirname(__file__))), 'ui', 'fonts')
try:
fonts = os.listdir(font_dir)
for i in fonts:
font = TTFont(os.path.join(font_dir, i))
font.save(os.path.join(sys_font_dir, i))
return True
except Exception as e:
logging.error(
"Error Installing the fonts. "
"You might have to manually install the fonts"
"Titillium Web : "
"https://fonts.google.com/specimen/Titillium+Web "
"Error: {}".format(e)
)
return False
# deprecate install fonts for Linux
return True

@staticmethod
def system():
Expand Down
1 change: 1 addition & 0 deletions guiscrcpy/ui/bottompanelui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ color: rgb(0, 0, 0);
</property>
<property name="font">
<font>
<family>Noto Sans</family>
<pointsize>18</pointsize>
<weight>75</weight>
<bold>true</bold>
Expand Down
8 changes: 4 additions & 4 deletions guiscrcpy/ui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ border-radius: 10px;
</property>
<property name="font">
<font>
<family>Titillium Web</family>
<family>Noto Sans</family>
<pointsize>11</pointsize>
<weight>50</weight>
<italic>false</italic>
Expand All @@ -690,7 +690,7 @@ border-radius: 10px;
</property>
<property name="font">
<font>
<family>Titillium Web</family>
<family>Noto Sans</family>
<pointsize>11</pointsize>
</font>
</property>
Expand Down Expand Up @@ -881,7 +881,7 @@ border-radius: 10px;
</property>
<property name="font">
<font>
<family>Courier 10 Pitch</family>
<family>Monospace</family>
</font>
</property>
<property name="placeholderText">
Expand Down Expand Up @@ -1582,7 +1582,7 @@ border-radius: 10px;
</property>
<property name="font">
<font>
<family>Titillium Web</family>
<family>Noto Sans</family>
</font>
</property>
<property name="styleSheet">
Expand Down
2 changes: 1 addition & 1 deletion guiscrcpy/ui/network.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<string>Network Manager</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>2</x>
Expand Down
8 changes: 4 additions & 4 deletions guiscrcpy/ui/pyqt5/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def setupUi(self, MainWindow):
sizePolicy.setHeightForWidth(self.dimensionDefaultCheckbox.sizePolicy().hasHeightForWidth())
self.dimensionDefaultCheckbox.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Titillium Web")
font.setFamily("Noto Sans")
font.setPointSize(11)
font.setBold(False)
font.setItalic(False)
Expand All @@ -388,7 +388,7 @@ def setupUi(self, MainWindow):
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Titillium Web")
font.setFamily("Noto Sans")
font.setPointSize(11)
self.label.setFont(font)
self.label.setObjectName("label")
Expand Down Expand Up @@ -489,7 +489,7 @@ def setupUi(self, MainWindow):
sizePolicy.setHeightForWidth(self.flaglineedit.sizePolicy().hasHeightForWidth())
self.flaglineedit.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Courier 10 Pitch")
font.setFamily("Monospace")
self.flaglineedit.setFont(font)
self.flaglineedit.setObjectName("flaglineedit")
self.verticalLayout.addWidget(self.flaglineedit)
Expand Down Expand Up @@ -766,7 +766,7 @@ def setupUi(self, MainWindow):
sizePolicy.setHeightForWidth(self.build_label.sizePolicy().hasHeightForWidth())
self.build_label.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Titillium Web")
font.setFamily("Noto Sans")
self.build_label.setFont(font)
self.build_label.setStyleSheet("color: rgb(255, 255, 255);")
self.build_label.setObjectName("build_label")
Expand Down
24 changes: 12 additions & 12 deletions guiscrcpy/ui/pyqt5/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ def setupUi(self, NetworkUI):
NetworkUI.resize(374, 414)
self.centralwidget = QtWidgets.QWidget(NetworkUI)
self.centralwidget.setObjectName("centralwidget")
self.widget = QtWidgets.QWidget(self.centralwidget)
self.widget.setGeometry(QtCore.QRect(2, 5, 371, 381))
self.widget.setObjectName("widget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget)
self.layoutWidget = QtWidgets.QWidget(self.centralwidget)
self.layoutWidget.setGeometry(QtCore.QRect(2, 5, 371, 381))
self.layoutWidget.setObjectName("layoutWidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(self.widget)
self.label = QtWidgets.QLabel(self.layoutWidget)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.listView = QtWidgets.QListWidget(self.widget)
self.listView = QtWidgets.QListWidget(self.layoutWidget)
self.listView.setObjectName("listView")
self.gridLayout.addWidget(self.listView, 0, 0, 1, 2)
self.nm_refresh = QtWidgets.QPushButton(self.widget)
self.nm_refresh = QtWidgets.QPushButton(self.layoutWidget)
self.nm_refresh.setObjectName("nm_refresh")
self.gridLayout.addWidget(self.nm_refresh, 5, 0, 1, 1)
self.tcpip = QtWidgets.QPushButton(self.widget)
self.tcpip = QtWidgets.QPushButton(self.layoutWidget)
self.tcpip.setObjectName("tcpip")
self.gridLayout.addWidget(self.tcpip, 4, 1, 1, 1)
self.spinBox = QtWidgets.QSpinBox(self.widget)
self.spinBox = QtWidgets.QSpinBox(self.layoutWidget)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
Expand All @@ -49,15 +49,15 @@ def setupUi(self, NetworkUI):
self.spinBox.setProperty("value", 5555)
self.spinBox.setObjectName("spinBox")
self.gridLayout.addWidget(self.spinBox, 4, 0, 1, 1)
self.nm_connect = QtWidgets.QPushButton(self.widget)
self.nm_connect = QtWidgets.QPushButton(self.layoutWidget)
self.nm_connect.setObjectName("nm_connect")
self.gridLayout.addWidget(self.nm_connect, 5, 1, 1, 1)
self.nm_det = QtWidgets.QPushButton(self.widget)
self.nm_det = QtWidgets.QPushButton(self.layoutWidget)
self.nm_det.setEnabled(False)
self.nm_det.setText("")
self.nm_det.setObjectName("nm_det")
self.gridLayout.addWidget(self.nm_det, 2, 0, 1, 2)
self.lineEdit = QtWidgets.QLineEdit(self.widget)
self.lineEdit = QtWidgets.QLineEdit(self.layoutWidget)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 1, 0, 1, 2)
self.verticalLayout.addLayout(self.gridLayout)
Expand Down
1 change: 1 addition & 0 deletions guiscrcpy/ui/pyqt5/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def setupUi(self, HorizontalPanel):
self.label = QtWidgets.QLabel(HorizontalPanel)
self.label.setGeometry(QtCore.QRect(0, -10, 20, 41))
font = QtGui.QFont()
font.setFamily("Noto Sans")
font.setPointSize(18)
font.setBold(True)
font.setWeight(75)
Expand Down
Loading

0 comments on commit 8d1d206

Please sign in to comment.